Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -2
Dockerfile
CHANGED
|
@@ -8,7 +8,6 @@ RUN apt-get update && apt-get install -y \
|
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
# Install all the "brains" Maira needs
|
| 11 |
-
# Added flask-cors to the list below!
|
| 12 |
RUN pip install --no-cache-dir \
|
| 13 |
flask \
|
| 14 |
flask-cors \
|
|
@@ -19,8 +18,16 @@ RUN pip install --no-cache-dir \
|
|
| 19 |
# Set the working directory
|
| 20 |
WORKDIR /app
|
| 21 |
|
| 22 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
COPY . .
|
| 24 |
|
| 25 |
# Start the engine
|
|
|
|
| 26 |
CMD ["python", "app.py"]
|
|
|
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
# Install all the "brains" Maira needs
|
|
|
|
| 11 |
RUN pip install --no-cache-dir \
|
| 12 |
flask \
|
| 13 |
flask-cors \
|
|
|
|
| 18 |
# Set the working directory
|
| 19 |
WORKDIR /app
|
| 20 |
|
| 21 |
+
# Download models BEFORE copying the rest of the code (to speed up rebuilds)
|
| 22 |
+
# Model 1: Small (360M)
|
| 23 |
+
RUN python3 -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='CyberCoder225/maira-model', filename='SmolLM2-360M-Instruct.Q4_K_M.gguf', local_dir='.')"
|
| 24 |
+
|
| 25 |
+
# Model 2: Medium (1B)
|
| 26 |
+
RUN python3 -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='bartowski/Llama-3.2-1B-Instruct-GGUF', filename='Llama-3.2-1B-Instruct-Q4_K_M.gguf', local_dir='.')"
|
| 27 |
+
|
| 28 |
+
# Copy your app.py and brain.py files
|
| 29 |
COPY . .
|
| 30 |
|
| 31 |
# Start the engine
|
| 32 |
+
EXPOSE 7860
|
| 33 |
CMD ["python", "app.py"]
|