Update Dockerfile
Browse files- Dockerfile +9 -9
Dockerfile
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
-
#
|
| 2 |
-
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
|
| 3 |
-
|
| 4 |
-
# Cache folder
|
| 5 |
-
ENV HF_HOME=/app/cache
|
| 6 |
-
|
| 7 |
-
# Use an official Python runtime as a parent image
|
| 8 |
FROM python:3.9-slim
|
| 9 |
|
| 10 |
-
# Set
|
| 11 |
WORKDIR /app
|
| 12 |
|
| 13 |
-
# Copy
|
| 14 |
COPY . /app
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
# Install any needed packages specified in requirements.txt
|
| 17 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 18 |
|
|
|
|
| 1 |
+
# Base image with Python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
FROM python:3.9-slim
|
| 3 |
|
| 4 |
+
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy everything into the container
|
| 8 |
COPY . /app
|
| 9 |
|
| 10 |
+
# Set Hugging Face cache location
|
| 11 |
+
ENV HF_HOME=/app/cache
|
| 12 |
+
|
| 13 |
+
# Create cache directory with safe permissions
|
| 14 |
+
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
|
| 15 |
+
|
| 16 |
# Install any needed packages specified in requirements.txt
|
| 17 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 18 |
|