Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +12 -7
Dockerfile
CHANGED
|
@@ -1,17 +1,22 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
RUN useradd -m -u 1000 user
|
| 4 |
USER user
|
| 5 |
# Set home to the user's home directory
|
| 6 |
ENV HOME=/home/user \
|
| 7 |
PATH=/home/user/.local/bin:$PATH
|
| 8 |
-
|
| 9 |
-
CMD ["zeno", "config.toml"]
|
| 10 |
-
COPY ./requirements.txt /code/requirements.txt
|
| 11 |
-
|
| 12 |
-
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 13 |
WORKDIR $HOME/app
|
| 14 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 15 |
COPY --chown=user . $HOME/app
|
|
|
|
| 16 |
RUN chown user:user -R $HOME/app
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
| 2 |
+
# you will also find guides on how best to write your Dockerfile
|
| 3 |
+
|
| 4 |
+
FROM python:3.8
|
| 5 |
|
| 6 |
RUN useradd -m -u 1000 user
|
| 7 |
USER user
|
| 8 |
# Set home to the user's home directory
|
| 9 |
ENV HOME=/home/user \
|
| 10 |
PATH=/home/user/.local/bin:$PATH
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
WORKDIR $HOME/app
|
| 12 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 13 |
COPY --chown=user . $HOME/app
|
| 14 |
+
ADD --chown=user ./.zeno_cache $HOME/app/.zeno_cache
|
| 15 |
RUN chown user:user -R $HOME/app
|
| 16 |
+
|
| 17 |
+
COPY ./requirements.txt /code/requirements.txt
|
| 18 |
+
|
| 19 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
CMD ["zeno", "config.toml"]
|