added Docker support

This commit is contained in:
Blake Mallory 2022-07-26 23:46:49 -04:00
parent efabaef132
commit f3461dac3a
3 changed files with 21 additions and 0 deletions

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu20.04
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/London
RUN apt-get update && apt-get upgrade -y
RUN apt install git -y \
&& apt install python3 -y \
&& apt install python3-pip -y \
&& apt install git -y \
&& apt install python-is-python3 -y \
&& apt install python3-tk -y \
&& apt install ffmpeg libsm6 libxext6 -y
RUN pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113 \
&& pip install opencv-python

2
build_image.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker build -t cog .

2
run_image.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
docker run --rm --name cog -it --gpus all -v "${PWD}":/workspace cog