Spaces:
Sleeping
Sleeping
priyansh-saxena1 commited on
Commit ·
5a79774
1
Parent(s): d5fb3e9
fix: default to no llm mode
Browse files- Dockerfile +3 -9
Dockerfile
CHANGED
|
@@ -5,18 +5,12 @@ WORKDIR /app
|
|
| 5 |
COPY requirements.txt .
|
| 6 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 7 |
|
| 8 |
-
|
| 9 |
-
ENV MOCK_LLM=
|
| 10 |
-
|
| 11 |
-
RUN if [ "$MOCK_LLM" != "true" ]; then \
|
| 12 |
-
pip install llama-cpp-python --no-cache-dir && \
|
| 13 |
-
mkdir -p /models && \
|
| 14 |
-
python -c "from huggingface_hub import hf_hub_download; hf_hub_download('bartowski/Qwen2.5-0.5B-Instruct-GGUF', 'Qwen2.5-0.5B-Instruct-Q4_K_M.gguf', local_dir='/models')"; \
|
| 15 |
-
fi
|
| 16 |
|
| 17 |
COPY app/ ./app/
|
| 18 |
COPY tests/ ./tests/
|
| 19 |
|
| 20 |
EXPOSE 7860
|
| 21 |
|
| 22 |
-
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 5 |
COPY requirements.txt .
|
| 6 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 7 |
|
| 8 |
+
# Default to mock mode for HF Spaces (no GPU available)
|
| 9 |
+
ENV MOCK_LLM=true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
COPY app/ ./app/
|
| 12 |
COPY tests/ ./tests/
|
| 13 |
|
| 14 |
EXPOSE 7860
|
| 15 |
|
| 16 |
+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|