Spaces:
Sleeping
Sleeping
Pre-download Hugging Face models during build
Browse files- Dockerfile +6 -0
Dockerfile
CHANGED
|
@@ -15,6 +15,12 @@ COPY requirements.txt ./
|
|
| 15 |
# Install Python dependencies
|
| 16 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
# Copy all application files (excluding .dockerignore patterns)
|
| 19 |
COPY . .
|
| 20 |
|
|
|
|
| 15 |
# Install Python dependencies
|
| 16 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
+
# Pre-download Hugging Face models during build
|
| 19 |
+
# This caches models in the Docker image for faster container startup
|
| 20 |
+
COPY download_models.py ./
|
| 21 |
+
COPY src/config/settings.yaml ./src/config/settings.yaml
|
| 22 |
+
RUN python download_models.py
|
| 23 |
+
|
| 24 |
# Copy all application files (excluding .dockerignore patterns)
|
| 25 |
COPY . .
|
| 26 |
|