Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +9 -3
Dockerfile
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
|
|
|
|
|
|
| 3 |
RUN useradd -m -u 1000 aim_user
|
| 4 |
|
| 5 |
# Switch to the "aim_user" user
|
|
@@ -13,18 +15,22 @@ ENV HOME=/home/aim_user \
|
|
| 13 |
WORKDIR $HOME
|
| 14 |
|
| 15 |
# install the `aim` package on the latest version
|
| 16 |
-
RUN pip install aim
|
| 17 |
|
| 18 |
#RUN aim telemetry off
|
| 19 |
|
| 20 |
ENTRYPOINT ["/bin/sh", "-c"]
|
| 21 |
|
| 22 |
-
COPY aim_repo.tar.gz .
|
| 23 |
-
RUN tar xvzf aim_repo.tar.gz
|
|
|
|
|
|
|
|
|
|
| 24 |
# have to run `aim init` in the directory that stores aim data for
|
| 25 |
# otherwise `aim up` will prompt for confirmation to create the directory itself.
|
| 26 |
# We run aim listening on 0.0.0.0 to expose all ports. Also, we run
|
| 27 |
# using `--dev` to print verbose logs. Port 43800 is the default port of
|
| 28 |
# `aim up` but explicit is better than implicit.
|
|
|
|
| 29 |
CMD ["aim up --host 0.0.0.0 --port 7860 --workers 2"]
|
| 30 |
|
|
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
| 3 |
+
ENV HF_REPO_ID=LocalResearchGroup/smollm2-135m-20250224_023514
|
| 4 |
+
|
| 5 |
RUN useradd -m -u 1000 aim_user
|
| 6 |
|
| 7 |
# Switch to the "aim_user" user
|
|
|
|
| 15 |
WORKDIR $HOME
|
| 16 |
|
| 17 |
# install the `aim` package on the latest version
|
| 18 |
+
RUN pip install aim huggingface-hub
|
| 19 |
|
| 20 |
#RUN aim telemetry off
|
| 21 |
|
| 22 |
ENTRYPOINT ["/bin/sh", "-c"]
|
| 23 |
|
| 24 |
+
# COPY aim_repo.tar.gz .
|
| 25 |
+
# RUN tar xvzf aim_repo.tar.gz
|
| 26 |
+
|
| 27 |
+
RUN python3 -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='${HF_REPO_ID}', allow_patterns='.aim/**')"
|
| 28 |
+
|
| 29 |
# have to run `aim init` in the directory that stores aim data for
|
| 30 |
# otherwise `aim up` will prompt for confirmation to create the directory itself.
|
| 31 |
# We run aim listening on 0.0.0.0 to expose all ports. Also, we run
|
| 32 |
# using `--dev` to print verbose logs. Port 43800 is the default port of
|
| 33 |
# `aim up` but explicit is better than implicit.
|
| 34 |
+
|
| 35 |
CMD ["aim up --host 0.0.0.0 --port 7860 --workers 2"]
|
| 36 |
|