From f3461dac3a7e6824d8c11b52d289928f4277a6a5 Mon Sep 17 00:00:00 2001 From: Blake Mallory Date: Tue, 26 Jul 2022 23:46:49 -0400 Subject: [PATCH] added Docker support --- Dockerfile | 17 +++++++++++++++++ build_image.sh | 2 ++ run_image.sh | 2 ++ 3 files changed, 21 insertions(+) create mode 100644 Dockerfile create mode 100755 build_image.sh create mode 100755 run_image.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1b95eca --- /dev/null +++ b/Dockerfile @@ -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 + diff --git a/build_image.sh b/build_image.sh new file mode 100755 index 0000000..8f3ef3d --- /dev/null +++ b/build_image.sh @@ -0,0 +1,2 @@ +#!/bin/sh +docker build -t cog . \ No newline at end of file diff --git a/run_image.sh b/run_image.sh new file mode 100755 index 0000000..04a0d5e --- /dev/null +++ b/run_image.sh @@ -0,0 +1,2 @@ +#!/bin/sh +docker run --rm --name cog -it --gpus all -v "${PWD}":/workspace cog \ No newline at end of file