-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.gpu
More file actions
49 lines (38 loc) · 1.43 KB
/
Copy pathDockerfile.gpu
File metadata and controls
49 lines (38 loc) · 1.43 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
# GPU CI image for roboharness.
# Based on NVIDIA CUDA runtime with pre-installed drivers, PyTorch (cu121),
# and all dev dependencies. Used by the gpu-test Cirun job.
#
# Published to: ghcr.io/miaodx/roboharness/ci-gpu
FROM nvidia/cuda:12.1.1-runtime-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
# System dependencies + Python 3.12
RUN apt-get update && \
apt-get install -y --no-install-recommends \
software-properties-common \
git \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
python3.12 \
python3.12-dev \
python3.12-venv \
&& rm -rf /var/lib/apt/lists/*
# Set Python 3.12 as default
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 && \
update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
ENV UV_SYSTEM_PYTHON=1
# Copy only dependency metadata first (for layer caching)
WORKDIR /opt/roboharness
COPY pyproject.toml .
COPY README.md .
RUN mkdir -p src/roboharness && \
echo '__version__ = "0.0.0"' > src/roboharness/__init__.py
# Install dev dependencies
RUN uv pip install -e ".[dev]"
# Install PyTorch with CUDA 12.1 support
RUN uv pip install torch --index-url https://download.pytorch.org/whl/cu121
# Clean up the dummy package
RUN rm -rf /opt/roboharness
WORKDIR /workspace