forked from HannesStark/boltzgen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
63 lines (51 loc) · 1.68 KB
/
Dockerfile
File metadata and controls
63 lines (51 loc) · 1.68 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
# syntax=docker/dockerfile:1
FROM nvidia/cuda:12.2.2-cudnn8-devel-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive \
PIP_NO_CACHE_DIR=1 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
CUDA_HOME=/usr/local/cuda \
PIP_EXTRA_INDEX_URL=https://download.pytorch.org/whl/cu121 \
HF_HOME=/cache
RUN apt-get update && \
apt-get install -y --no-install-recommends \
software-properties-common \
curl \
&& add-apt-repository -y ppa:deadsnakes/ppa \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
python3.11 \
python3.11-dev \
python3.11-venv \
build-essential \
git \
cmake \
pkg-config \
libffi-dev \
libssl-dev \
libxml2-dev \
libxslt-dev \
libgl1 \
libhdf5-dev \
libboost-all-dev \
&& rm -rf /var/lib/apt/lists/*
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 && \
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 && \
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11 && \
python3.11 -m pip install --upgrade pip setuptools setuptools_scm wheel
WORKDIR /app
COPY . /app
RUN pip install --no-cache-dir -e /app
ARG DOWNLOAD_WEIGHTS=false
RUN mkdir -p "${HF_HOME}" && \
if [ "${DOWNLOAD_WEIGHTS}" = "true" ]; then \
boltzgen download all --cache "${HF_HOME}" --force_download; \
fi
ARG USERNAME=boltzgen
ARG USER_UID=1000
ARG USER_GID=1000
RUN groupadd --gid ${USER_GID} ${USERNAME} && \
useradd --uid ${USER_UID} --gid ${USER_GID} --create-home --shell /bin/bash ${USERNAME}
RUN mkdir -p "${HF_HOME}" && chown -R ${USER_UID}:${USER_GID} "${HF_HOME}"
USER ${USERNAME}
WORKDIR /workspace