File size: 1,129 Bytes
00c3521 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
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"] |