Update Dockerfile
Browse files- Dockerfile +7 -7
Dockerfile
CHANGED
|
@@ -7,17 +7,17 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 7 |
|
| 8 |
COPY ./app ./app
|
| 9 |
|
| 10 |
-
# Create
|
| 11 |
RUN adduser --disabled-password --gecos '' appuser || true
|
| 12 |
-
|
| 13 |
-
# Switch to that user
|
| 14 |
USER appuser
|
| 15 |
|
| 16 |
-
# Correct cache directories
|
| 17 |
ENV HOME=/home/appuser
|
| 18 |
-
ENV HF_HOME=/home/appuser/.cache
|
| 19 |
-
ENV TRANSFORMERS_CACHE=/home/appuser/.cache
|
| 20 |
-
ENV
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
RUN mkdir -p /home/appuser/.cache && \
|
| 23 |
mkdir -p /home/appuser/.cache/torchinductor && \
|
|
|
|
| 7 |
|
| 8 |
COPY ./app ./app
|
| 9 |
|
| 10 |
+
# Create appuser (if not exists)
|
| 11 |
RUN adduser --disabled-password --gecos '' appuser || true
|
|
|
|
|
|
|
| 12 |
USER appuser
|
| 13 |
|
|
|
|
| 14 |
ENV HOME=/home/appuser
|
| 15 |
+
ENV HF_HOME=/home/appuser/.cache/huggingface
|
| 16 |
+
ENV TRANSFORMERS_CACHE=/home/appuser/.cache/huggingface
|
| 17 |
+
ENV HUGGINGFACE_HUB_CACHE=/home/appuser/.cache/huggingface
|
| 18 |
+
|
| 19 |
+
RUN mkdir -p /home/appuser/.cache/huggingface && \
|
| 20 |
+
chmod -R 777 /home/appuser/.cache
|
| 21 |
|
| 22 |
RUN mkdir -p /home/appuser/.cache && \
|
| 23 |
mkdir -p /home/appuser/.cache/torchinductor && \
|