Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build fails #6

Open
slaxor505 opened this issue Jan 14, 2020 · 3 comments
Open

Docker build fails #6

slaxor505 opened this issue Jan 14, 2020 · 3 comments

Comments

@slaxor505
Copy link

I'm trying to build Docker image but I got the following error:

Step 9/11 : RUN python cougar.py
---> Running in e2f64e470329
Traceback (most recent call last):
File "cougar.py", line 3, in
from fastai.vision import (
File "/usr/local/lib/python3.6/site-packages/fastai/vision/init.py", line 3, in
from .learner import *
File "/usr/local/lib/python3.6/site-packages/fastai/vision/learner.py", line 6, in
from . import models
File "/usr/local/lib/python3.6/site-packages/fastai/vision/models/init.py", line 2, in
from torchvision.models import ResNet,resnet18,resnet34,resnet50,resnet101,resnet152
File "/usr/local/lib/python3.6/site-packages/torchvision/init.py", line 4, in
from torchvision import datasets
File "/usr/local/lib/python3.6/site-packages/torchvision/datasets/init.py", line 9, in
from .fakedata import FakeData
File "/usr/local/lib/python3.6/site-packages/torchvision/datasets/fakedata.py", line 3, in
from .. import transforms
File "/usr/local/lib/python3.6/site-packages/torchvision/transforms/init.py", line 1, in
from .transforms import *
File "/usr/local/lib/python3.6/site-packages/torchvision/transforms/transforms.py", line 17, in
from . import functional as F
File "/usr/local/lib/python3.6/site-packages/torchvision/transforms/functional.py", line 5, in
from PIL import Image, ImageOps, ImageEnhance, PILLOW_VERSION
ImportError: cannot import name 'PILLOW_VERSION'
The command '/bin/sh -c python cougar.py' returned a non-zero code: 1

@hugovk
Copy link

hugovk commented Jan 18, 2020

This has been fixed in the new torchvision 0.5.0.

Please upgrade: pip install torchvision>=0.5.0"

@slaxor505
Copy link
Author

@hugovk thank you for the reply. Sorry I may be wrong but I thought that Docker build is supposed to install all required packages into image. Where should I run "pip install torchvision>=0.5.0"?

@hugovk
Copy link

hugovk commented Jan 29, 2020

I guess it's a dependency of one of these:

# Install pytorch and fastai
RUN pip install torch_nightly -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
RUN pip install fastai

You could try adding RUN pip install torchvision>=0.5.0" there too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants