First of all thank you for replying!
So are you saying that I should go to source code and change this line:
“_solve_func = getattr(torch, ‘solve’, torch.gesv)”
Manually? I think I would face the same issues andres is facing.
See his answer below mine.
I tried / trying another path, but while, faced another error, maybe you can help.
So I went to my VM JupyterHub.
Checked ! pip install list.
And transformed my requirments.txt file to mimic what ! pip install returned.
So I know I have a perfect match of what I am deploying vs what I trained on.
So I ended up with the following requirements doc:"
‘’’
numpy==1.16.2
torchvision==0.3.0
https://download.pytorch.org/whl/cpu/torch-1.1.0-cp37-cp37m-linux_x86_64.whl
fastai==1.0.55
starlette==0.11.4
uvicorn==0.3.32
python-multipart
aiofiles==0.4.0
aiohttp==3.5.4
‘’’
And here is my current docker file
‘’’
FROM python:3.6-slim-stretch
RUN apt update
RUN apt install -y python3-dev gcc
ADD requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY app app/
RUN python app/server.py
EXPOSE 8080
CMD [“python”, “app/server.py”, “serve”]
#CMD [“gunicorn”, “-b”, “:8080”, “–chdir”, “app/”, “main:app”]
#RUN python app/server.py
#gcloud app update --no-split-health-check
‘’’
However, when I tried to launch I got the following error:
‘’’
Step 5/9 : RUN pip install -r requirements.txt
—> Running in 0132b685c40c
ERROR: torch-1.1.0-cp37-cp37m-linux_x86_64.whl is not a supported wheel on this platform.
WARNING: You are using pip version 19.2.1, however version 19.2.2 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.
The command ‘/bin/sh -c pip install -r requirements.txt’ returned a non-zero code: 1
ERROR
ERROR: build step 0 “gcr.io/cloud-builders/docker” failed: exit status 1
‘’’
That was due to =
https://download.pytorch.org/whl/cpu/torch-1.1.0-cp37-cp37m-linux_x86_64.whl
trying to install version for Python 3.7 (CP37) vs Docker file specifying Python 3.6
So I changed it to:
https://download.pytorch.org/whl/cpu/torch-1.1.0-cp36-cp36m-linux_x86_64.whl
And now facing this error.
from torchvision import _C
ImportError: libcudart.so.9.0: cannot open shared object file: No such file or directory
The command ‘/bin/sh -c python app/server.py’ returned a non-zero code: 1
ERROR
ERROR: build step 0 “gcr.io/cloud-builders/docker” failed: exit status 1
Looked into it, and it has to do with CUDA versioning…
Looks like this will never end.
I am giving up for now.
PS.
The app did deploy on render…
So an easier way out.
Here is my GIT if it helps anyone here: