Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
git \
build-essential \
libgl1 \
libglib2.0-0 \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -48,9 +50,15 @@ COPY scripts/ ./scripts/
RUN uv sync --frozen

# Pre-download ESM3 model to bake it into the image.
# The generate script loads esm3-open without authentication, so no HF token is needed.
# The repo is gated — pass your HuggingFace token at build time via:
# docker build --secret id=hf_token,env=HF_TOKEN .
ENV HF_HOME=/app/.cache/huggingface
RUN . .venv/bin/activate && python -c "\
RUN --mount=type=secret,id=hf_token \
Comment thread
vratins marked this conversation as resolved.
export HF_TOKEN=$(cat /run/secrets/hf_token 2>/dev/null || true) && \
[ -n "$HF_TOKEN" ] || { echo "ERROR: hf_token secret is empty or not provided. Pass --secret id=hf_token,env=HF_TOKEN at build time." >&2; exit 1; } && \
export HUGGING_FACE_HUB_TOKEN=$HF_TOKEN && \
. .venv/bin/activate && \
python -c "\
Comment thread
coderabbitai[bot] marked this conversation as resolved.
from esm.models.esm3 import ESM3; \
ESM3.from_pretrained('esm3-open'); \
print('ESM3 model downloaded successfully')"
Comment thread
vratins marked this conversation as resolved.
Expand Down
Loading