Docker cant install pytorch 1.9.1 with cuda 10.2

Published

I am new to docker and I am trying to create a custom image for a streamlit webapp from this base image: pymesh/pymesh

The Dockerfile looks like this:

FROM pymesh/pymesh:latest

WORKDIR /app

COPY requirements.txt ./requirements.txt

RUN pip install -r requirements.txt

EXPOSE 8501

COPY . /app

ENTRYPOINT ["streamlit", "run"]

CMD ["dockerapp.py"]

When I try to create the docker image by using this command:

docker build -t meshnetprototype:latest .

I get this error:

#9 26.53   Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
#9 26.61 Collecting toolz==0.11.1
#9 26.66   Downloading toolz-0.11.1-py3-none-any.whl (55 kB)
#9 26.83 ERROR: Could not find a version that satisfies the requirement torch==1.9.1+cu102 (from -r requirements.txt (line 57)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 0.4.1, 0.4.1.post2, 1.0.0, 1.0.1, 1.0.1.post2, 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.4.0, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1)
#9 26.83 ERROR: No matching distribution found for torch==1.9.1+cu102 (from -r requirements.txt (line 57))
#9 27.13 WARNING: You are using pip version 20.1.1; however, version 21.2.4 is available.
#9 27.13 You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
------
executor failed running [/bin/sh -c pip install -r requirements.txt]: exit code: 1

The concerned part of the reqirements.txt file is this:

torch==1.9.1+cu102

This is my requirements.txt file if you want to take a look at the complete file.

How do I resolve this error?

Thank You

Source: Docker Questions

Published
Categorised as docker, pytorch Tagged ,

Answers

Leave a Reply

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq