Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +5 -5
Dockerfile
CHANGED
|
@@ -2,17 +2,17 @@ FROM python:3.10-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install
|
| 6 |
-
RUN apt-get update && apt-get install -y
|
| 7 |
-
|
| 8 |
-
|
|
|
|
| 9 |
|
| 10 |
COPY requirements.txt .
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
COPY . .
|
| 14 |
|
| 15 |
-
# Hugging Face Spaces expose port 7860 by default
|
| 16 |
EXPOSE 7860
|
| 17 |
|
| 18 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install standard fast dependencies
|
| 6 |
+
RUN apt-get update && apt-get install -y libopenblas-dev && rm -rf /var/lib/apt/lists/*
|
| 7 |
+
|
| 8 |
+
# Force install the pre-compiled wheel made specifically for HF Spaces Free Tier
|
| 9 |
+
RUN pip install --no-cache-dir https://huggingface.co/Luigi/llama-cpp-python-wheels-hf-spaces-free-cpu/resolve/main/llama_cpp_python-0.3.22-cp310-cp310-linux_x86_64.whl
|
| 10 |
|
| 11 |
COPY requirements.txt .
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
| 14 |
COPY . .
|
| 15 |
|
|
|
|
| 16 |
EXPOSE 7860
|
| 17 |
|
| 18 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|