From 6f30ec5fa4c9ae932101f8f34568f8e85787519f Mon Sep 17 00:00:00 2001 From: Oscar Pocock Date: Thu, 5 May 2022 16:47:04 +0100 Subject: [PATCH] Added dockerfiles for NVidia and AMD --- Dockerfile.amd-gpu | 15 +++++++++++++++ Dockerfile.nvidia-gpu | 17 +++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 Dockerfile.amd-gpu create mode 100644 Dockerfile.nvidia-gpu diff --git a/Dockerfile.amd-gpu b/Dockerfile.amd-gpu new file mode 100644 index 0000000..1c94b67 --- /dev/null +++ b/Dockerfile.amd-gpu @@ -0,0 +1,15 @@ +FROM python:3.8 + +RUN apt update -y + +RUN apt install libgl1 -y # or install opencv opencv-python-headless instead + +RUN pip3 install torch \ + torchvision==0.11.3 \ + -f https://download.pytorch.org/whl/rocm4.2/torch_stable.html + +COPY requirements.txt /requirements.txt + +RUN pip3 install -r requirements.txt + +ENTRYPOINT ["bash"] \ No newline at end of file diff --git a/Dockerfile.nvidia-gpu b/Dockerfile.nvidia-gpu new file mode 100644 index 0000000..45938af --- /dev/null +++ b/Dockerfile.nvidia-gpu @@ -0,0 +1,17 @@ +FROM python:3.8 + +RUN apt update -y + +RUN apt install libgl1 -y # or install opencv opencv-python-headless instead + +RUN pip3 install \ + torch==1.11.0+cu113 \ + torchvision==0.12.0+cu113 \ + torchaudio==0.11.0+cu113 \ + -f https://download.pytorch.org/whl/cu113/torch_stable.html + +COPY requirements.txt /requirements.txt + +RUN pip3 install -r requirements.txt + +ENTRYPOINT ["bash"] \ No newline at end of file