Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +3 -2
Dockerfile
CHANGED
|
@@ -11,8 +11,8 @@ ENV PATH="/home/user/.local/bin:$PATH"
|
|
| 11 |
|
| 12 |
WORKDIR /app
|
| 13 |
|
| 14 |
-
# Create
|
| 15 |
-
RUN mkdir -p /
|
| 16 |
|
| 17 |
# Copy requirements first to leverage Docker cache
|
| 18 |
COPY --chown=user requirements.txt requirements.txt
|
|
@@ -24,6 +24,7 @@ COPY --chown=user . /app
|
|
| 24 |
# Set environment variables
|
| 25 |
ENV FLASK_APP=app.py
|
| 26 |
ENV FLASK_ENV=production
|
|
|
|
| 27 |
|
| 28 |
# Expose the port the app runs on
|
| 29 |
EXPOSE 7860
|
|
|
|
| 11 |
|
| 12 |
WORKDIR /app
|
| 13 |
|
| 14 |
+
# Create cache directory
|
| 15 |
+
RUN mkdir -p /home/user/.cache/huggingface/hub
|
| 16 |
|
| 17 |
# Copy requirements first to leverage Docker cache
|
| 18 |
COPY --chown=user requirements.txt requirements.txt
|
|
|
|
| 24 |
# Set environment variables
|
| 25 |
ENV FLASK_APP=app.py
|
| 26 |
ENV FLASK_ENV=production
|
| 27 |
+
ENV HF_HOME=/home/user/.cache/huggingface
|
| 28 |
|
| 29 |
# Expose the port the app runs on
|
| 30 |
EXPOSE 7860
|