Skip to content

Commit 0ea65a8

Browse files
support cu124 dockerfile (#192)
1 parent 11f31f5 commit 0ea65a8

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

Dockerfile_cu124

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
FROM nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04 AS base
2+
3+
WORKDIR /app
4+
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
7+
RUN sed -i 's|http://archive.ubuntu.com/ubuntu/|https://mirrors.tuna.tsinghua.edu.cn/ubuntu/|g' /etc/apt/sources.list && \
8+
sed -i 's|http://security.ubuntu.com/ubuntu/|https://mirrors.tuna.tsinghua.edu.cn/ubuntu/|g' /etc/apt/sources.list
9+
10+
RUN apt-get update && \
11+
apt-get install -y vim tmux zip unzip wget git cmake build-essential software-properties-common curl libibverbs-dev ca-certificates iproute2 ffmpeg libsm6 libxext6 && \
12+
add-apt-repository ppa:deadsnakes/ppa && \
13+
apt-get update && \
14+
apt-get install -y python3.11 python3.11-venv python3.11-dev python3-pip && \
15+
apt-get clean && rm -rf /var/lib/apt/lists/*
16+
17+
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 && \
18+
update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1
19+
20+
RUN python -m pip install --upgrade pip
21+
22+
RUN pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
23+
24+
RUN pip install packaging ninja opencv-python
25+
26+
# download torch and torchvision wheels into whls filefold
27+
COPY whls/*.whl /app/
28+
29+
RUN pip install --no-cache-dir torch-*.whl torchvision*.whl
30+
31+
COPY requirements/runtime.txt /app/
32+
33+
RUN pip install --no-cache-dir -r runtime.txt
34+
35+
WORKDIR /workspace
36+
37+
# download fast-hadamard-transform source code
38+
COPY fast-hadamard-transform /workspace/fast-hadamard-transform
39+
40+
RUN cd fast-hadamard-transform && pip install --no-cache-dir -v -e .
41+
42+
RUN rm -rf /app

0 commit comments

Comments
 (0)