forked from Lancelot39/Causal-Copilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.gpu
More file actions
64 lines (49 loc) · 1.75 KB
/
Dockerfile.gpu
File metadata and controls
64 lines (49 loc) · 1.75 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
56
57
58
59
60
61
62
63
64
FROM pytorch/pytorch:2.2.0-cuda12.1-cudnn8-devel
ENV DEBIAN_FRONTEND=noninteractive
USER root
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y tzdata
RUN apt-get update && apt-get install -y \
build-essential \
wget \
perl \
graphviz \
git \
vim \
&& rm -rf /var/lib/apt/lists/*
# Install TinyTeX
RUN rm -rf ~/.TinyTeX && \
wget -qO- "https://yihui.org/tinytex/install-bin-unix.sh" | sh && \
echo 'export PATH="$PATH:$HOME/.TinyTeX/bin/x86_64-linux"' >> ~/.bashrc && \
. ~/.bashrc
# Install TeX packages
RUN apt-get update && apt-get install -y \
texlive-latex-base \
texlive-latex-extra \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y python3-pip
# Copy requirements files
COPY requirements_gpu.txt ./
# Install GPU requirements
RUN pip install --no-cache-dir -r requirements_gpu.txt --no-deps
# Copy application code
COPY . .
# Set Python path
ENV PYTHONPATH=/app
# Setup GPU acceleration
RUN apt-get update && apt-get install -y libboost-python-dev libboost-numpy-dev && \
pip install \
--extra-index-url=https://pypi.nvidia.com \
"cudf-cu12==25.4.*" "dask-cudf-cu12==25.4.*" "cuml-cu12==25.4.*" \
"cugraph-cu12==25.4.*" "nx-cugraph-cu12==25.4.*" "cuspatial-cu12==25.4.*" \
"cuproj-cu12==25.4.*" "cuxfilter-cu12==25.4.*" "cucim-cu12==25.4.*" \
"pylibraft-cu12==25.4.*" "raft-dask-cu12==25.4.*" "cuvs-cu12==25.4.*" \
"nx-cugraph-cu12==25.4.*"
# Compile external code for GPU acceleration
RUN cd externals/pc_adjacency_search && make
# Set up bash as default shell with useful aliases
RUN echo 'alias ll="ls -la"' >> ~/.bashrc && \
echo 'alias python="python3"' >> ~/.bashrc
# Start interactive bash shell by default
CMD ["/bin/bash"]