-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (44 loc) · 1.21 KB
/
Copy pathDockerfile
File metadata and controls
52 lines (44 loc) · 1.21 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
ARG CUDA_VERSION=12.8.0
ARG PYTHON_VERSION=3.12
# 使用 Ubuntu 22.04 和 CUDA 12.8 的基础镜像
FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu22.04 AS base
# 设置环境变量以避免交互式提示
ENV DEBIAN_FRONTEND=noninteractive
# 安装系统依赖
RUN apt-get update && \
apt-get install -y --no-install-recommends \
software-properties-common \
curl \
git \
unzip \
build-essential \
libgl1 \
gcc-10 \
g++-10 \
net-tools \
etcd \
cmake \
vim \
wget \
iperf \
iputils-ping \
iproute2 \
libibverbs-dev \
libgoogle-glog-dev \
libgtest-dev \
libjsoncpp-dev \
libnuma-dev \
libcurl4-openssl-dev \
libhiredis-dev \
&& rm -rf /var/lib/apt/lists/*
# 添加 deadsnakes PPA 以安装 Python 3.12
RUN add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y python3.12 python3.12-venv python3.12-dev
# 设置 Python 3.12 为默认版本
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1
# 安装 pip
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3
# 设置工作目录
WORKDIR /workspace
CMD ["bash"]