NPRC24 / PolyuColor /Dockerfile
Artyom
polyucolor
00c3521 verified
FROM nvidia/cuda:11.3.1-cudnn8-runtime-ubuntu20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
libpng-dev libjpeg-dev \
libopencv-dev ffmpeg \
libgl1-mesa-glx && \
apt clean && \
rm -rf /var/lib/apt/lists/*
RUN apt update && \
apt install -y \
wget build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev \
libreadline-dev libffi-dev libsqlite3-dev libbz2-dev liblzma-dev && \
apt clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /temp
RUN wget https://www.python.org/ftp/python/3.9.10/Python-3.9.10.tgz && \
tar -xvf Python-3.9.10.tgz
RUN cd Python-3.9.10 && \
./configure --enable-optimizations && \
make && \
make install
WORKDIR /workspace
RUN rm -r /temp && \
ln -s /usr/local/bin/python3 /usr/local/bin/python && \
ln -s /usr/local/bin/pip3 /usr/local/bin/pip
COPY requirements.txt .
RUN python -m pip install --no-cache -r requirements.txt
RUN pip install torch==2.1.0 torchvision==0.16.0 --index-url https://download.pytorch.org/whl/cu118 --no-cache
WORKDIR ..
COPY . .
CMD ["./run.sh"]