Spaces:
Sleeping
Sleeping
Deploy MyAbs v0.2 (Docker Space)
Browse files- Dockerfile +7 -2
Dockerfile
CHANGED
|
@@ -19,13 +19,18 @@ RUN mamba install -y -n base \
|
|
| 19 |
|
| 20 |
# ---- pip deps -------------------------------------------------------------
|
| 21 |
# CPU-only torch FIRST so ImmuneBuilder sees torch satisfied and does not pull
|
| 22 |
-
# the multi-GB CUDA build.
|
| 23 |
-
# ensemble weights, so no runtime weight download.
|
| 24 |
RUN pip install --no-cache-dir \
|
| 25 |
torch --index-url https://download.pytorch.org/whl/cpu && \
|
| 26 |
pip install --no-cache-dir \
|
| 27 |
ImmuneBuilder gradio py3Dmol
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
# ---- HF Spaces requirement: run as uid 1000 with a writable home ----------
|
| 30 |
# The miniforge base already has a user at uid 1000, so -o allows the dup uid
|
| 31 |
# while still giving us a clean "user" account + /home/user.
|
|
|
|
| 19 |
|
| 20 |
# ---- pip deps -------------------------------------------------------------
|
| 21 |
# CPU-only torch FIRST so ImmuneBuilder sees torch satisfied and does not pull
|
| 22 |
+
# the multi-GB CUDA build.
|
|
|
|
| 23 |
RUN pip install --no-cache-dir \
|
| 24 |
torch --index-url https://download.pytorch.org/whl/cpu && \
|
| 25 |
pip install --no-cache-dir \
|
| 26 |
ImmuneBuilder gradio py3Dmol
|
| 27 |
|
| 28 |
+
# The pip package ships WITHOUT the ~674MB ABodyBuilder2 ensemble — it downloads
|
| 29 |
+
# on first init. Do that here at BUILD time (as root) so the weights are baked
|
| 30 |
+
# into the image (world-readable), avoiding a runtime download AND the
|
| 31 |
+
# PermissionError the non-root runtime user would hit writing into site-packages.
|
| 32 |
+
RUN python -c "from ImmuneBuilder import ABodyBuilder2; ABodyBuilder2()"
|
| 33 |
+
|
| 34 |
# ---- HF Spaces requirement: run as uid 1000 with a writable home ----------
|
| 35 |
# The miniforge base already has a user at uid 1000, so -o allows the dup uid
|
| 36 |
# while still giving us a clean "user" account + /home/user.
|