Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +3 -4
Dockerfile
CHANGED
|
@@ -21,11 +21,10 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 21 |
RUN useradd -m -u 1000 appuser
|
| 22 |
|
| 23 |
# Create cache directories and set proper ownership
|
| 24 |
-
RUN mkdir -p /app/.cache/huggingface
|
| 25 |
chown -R appuser:appuser /app
|
| 26 |
|
| 27 |
-
# Set environment
|
| 28 |
-
ENV TRANSFORMERS_CACHE=/app/.cache/huggingface/transformers
|
| 29 |
ENV HF_HOME=/app/.cache/huggingface
|
| 30 |
|
| 31 |
# Copy the rest of the application code into the container
|
|
@@ -38,7 +37,7 @@ RUN chown -R appuser:appuser /app
|
|
| 38 |
USER appuser
|
| 39 |
|
| 40 |
# Expose the port the app runs on
|
| 41 |
-
EXPOSE
|
| 42 |
|
| 43 |
# Command to run the application
|
| 44 |
CMD ["python", "app.py"]
|
|
|
|
| 21 |
RUN useradd -m -u 1000 appuser
|
| 22 |
|
| 23 |
# Create cache directories and set proper ownership
|
| 24 |
+
RUN mkdir -p /app/.cache/huggingface && \
|
| 25 |
chown -R appuser:appuser /app
|
| 26 |
|
| 27 |
+
# Set environment variable for Hugging Face cache
|
|
|
|
| 28 |
ENV HF_HOME=/app/.cache/huggingface
|
| 29 |
|
| 30 |
# Copy the rest of the application code into the container
|
|
|
|
| 37 |
USER appuser
|
| 38 |
|
| 39 |
# Expose the port the app runs on
|
| 40 |
+
EXPOSE 7860
|
| 41 |
|
| 42 |
# Command to run the application
|
| 43 |
CMD ["python", "app.py"]
|