Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +2 -4
Dockerfile
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
# Install system dependencies
|
|
@@ -14,10 +13,12 @@ WORKDIR /app
|
|
| 14 |
|
| 15 |
# Create a cache directory with proper permissions
|
| 16 |
RUN mkdir -p /app/cache/huggingface && chmod -R 777 /app/cache
|
|
|
|
| 17 |
|
| 18 |
# Set environment variables for Hugging Face cache
|
| 19 |
ENV HF_HOME=/app/cache/huggingface
|
| 20 |
ENV HUGGINGFACE_HUB_CACHE=/app/cache/huggingface/hub
|
|
|
|
| 21 |
|
| 22 |
# Copy requirements file
|
| 23 |
COPY requirements.txt .
|
|
@@ -28,9 +29,6 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 28 |
# Copy application code
|
| 29 |
COPY . .
|
| 30 |
|
| 31 |
-
# Download model weights during build (optional, if disk space allows)
|
| 32 |
-
RUN huggingface-cli download openai/gpt-oss-20b --include "original/*" --local-dir /app/gpt-oss-20b || true
|
| 33 |
-
|
| 34 |
# Expose port for the API
|
| 35 |
EXPOSE 8000
|
| 36 |
|
|
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
# Install system dependencies
|
|
|
|
| 13 |
|
| 14 |
# Create a cache directory with proper permissions
|
| 15 |
RUN mkdir -p /app/cache/huggingface && chmod -R 777 /app/cache
|
| 16 |
+
RUN mkdir -p /app/gpt-oss-20b && chmod -R 777 /app/gpt-oss-20b
|
| 17 |
|
| 18 |
# Set environment variables for Hugging Face cache
|
| 19 |
ENV HF_HOME=/app/cache/huggingface
|
| 20 |
ENV HUGGINGFACE_HUB_CACHE=/app/cache/huggingface/hub
|
| 21 |
+
ENV HF_HUB_ENABLE_HF_TRANSFER=1
|
| 22 |
|
| 23 |
# Copy requirements file
|
| 24 |
COPY requirements.txt .
|
|
|
|
| 29 |
# Copy application code
|
| 30 |
COPY . .
|
| 31 |
|
|
|
|
|
|
|
|
|
|
| 32 |
# Expose port for the API
|
| 33 |
EXPOSE 8000
|
| 34 |
|