-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
71 lines (64 loc) · 2.73 KB
/
Copy pathDockerfile
File metadata and controls
71 lines (64 loc) · 2.73 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
65
66
67
68
69
70
71
# syntax=docker/dockerfile:1
FROM pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime@sha256:77f17f843507062875ce8be2a6f76aa6aa3df7f9ef1e31d9d7432f4b0f563dee
COPY --from=ghcr.io/astral-sh/uv:0.6.16@sha256:db305ce8edc1c2df4988b9d23471465d90d599cc55571e6501421c173a33bb0b /uv /uvx /bin/
LABEL maintainer="Nicholas Hadler <nhadler@berkeley.edu>"
LABEL org.opencontainers.image.description="Docker image for Libra-ML packaged with xTB and CREST."
LABEL org.opencontainers.image.source=https://github.com/Hartwig-Group/Libra-ML
LABEL org.opencontainers.image.licenses=BSD-3
# Move to temporary working directory
WORKDIR /tmp
# Install system dependencies, xTB, CREST, and clean up
RUN apt-get update && \
apt-get install --no-install-recommends -y \
git \
wget \
openbabel \
xz-utils && \
# Install xTB
wget --progress=dot:giga https://github.com/grimme-lab/xtb/releases/download/v6.7.1/xtb-6.7.1-linux-x86_64.tar.xz && \
tar -xf xtb-6.7.1-linux-x86_64.tar.xz && \
mv xtb-dist /usr/local/bin/ && \
rm xtb-6.7.1-linux-x86_64.tar.xz && \
# Install CREST
wget --no-cache --progress=dot:giga https://github.com/crest-lab/crest/releases/download/v3.0.2/crest-intel-2023.1.0-ubuntu-latest.tar.xz && \
tar xvf crest-intel-2023.1.0-ubuntu-latest.tar.xz && \
mv crest/crest /usr/local/bin/ && \
chmod +x /usr/local/bin/crest && \
rm -rf crest-intel-2023.1.0-ubuntu-latest.tar.xz crest && \
# Clean up apt cache
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set the environment variables
ENV OMP_STACKSIZE="4G" \
OMP_NUM_THREADS="4,1" \
OMP_MAX_ACTIVE_LEVELS="1" \
OMP_SCHEDULE="dynamic" \
UV_COMPILE_BYTECODE=1 \
UV_SYSTEM_PYTHON=1 \
UV_PROJECT_ENVIRONMENT=/opt/conda/ \
PATH=/usr/local/bin/xtb-dist/bin/:/root/.local/bin:$PATH
# Install Python dependencies including Libra-ML
COPY . .
RUN uv sync \
--inexact \
--no-editable \
--locked \
--no-cache-dir \
--no-install-package torch \
--no-install-package triton \
--no-install-package keras \
--no-install-package tensorflow \
--no-install-package tensorboard \
--no-install-package nvidia-cusparse-cu12 \
--no-install-package nvidia-cusparselt-cu12 \
--no-install-package nvidia-nvjitlink-cu12 \
--no-install-package nvidia-cudnn-cu12 \
--no-install-package nvidia-cufft-cu12 \
--no-install-package nvidia-cuda-nvrtc-cu12 \
--no-install-package nvidia-cusolver-cu12 \
--no-install-package nvidia-cuda-cupti-cu12 \
--no-install-package nvidia-cublas-cu12 \
--no-install-package nvidia-curand-cu12 \
--no-install-package nvidia-nccl-cu12 && \
uv pip install --no-cache-dir torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-2.6.0+cu124.html
WORKDIR /app