-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (46 loc) · 1.41 KB
/
Dockerfile
File metadata and controls
55 lines (46 loc) · 1.41 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM nvcr.io/nvidia/cuda:11.8.0-base-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
# Ensure system packages are updated and install prerequisites
RUN apt-get update && apt-get install -y \
software-properties-common \
build-essential \
wget \
curl \
libssl-dev \
zlib1g-dev \
libbz2-dev \
libreadline-dev \
libsqlite3-dev \
libffi-dev \
libncurses5-dev \
libncursesw5-dev \
xz-utils \
tk-dev \
liblzma-dev \
git \
ca-certificates \
unzip \
git-lfs \
&& rm -rf /var/lib/apt/lists/* \
&& git lfs install
# Install Python 3.9.20 from source
RUN wget https://www.python.org/ftp/python/3.9.20/Python-3.9.20.tgz \
&& tar -xf Python-3.9.20.tgz \
&& cd Python-3.9.20 \
&& ./configure --enable-optimizations \
&& make -j$(nproc) \
&& make altinstall \
&& cd .. \
&& rm -rf Python-3.9.20 Python-3.9.20.tgz
# Ensure pip is upgraded
RUN python3.9 -m pip install --upgrade pip
# Set Python 3.9 as the default python
RUN update-alternatives --install /usr/bin/python python /usr/local/bin/python3.9 1
# Optional: Set python3 and python alias to python3.9
RUN ln -sf /usr/local/bin/python3.9 /usr/bin/python3 \
&& ln -sf /usr/local/bin/python3.9 /usr/bin/python
RUN pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2
COPY ./requirements.txt /root
RUN cd /root \
&& pip install -r requirements.txt
WORKDIR /root/DirectDrag