Spaces:
Build error
Build error
Create Dockerfile
Browse files- Dockerfile +16 -0
Dockerfile
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
|
| 5 |
+
# Install build tools for llama-cpp
|
| 6 |
+
RUN apt-get update && apt-get install -y gcc g++ make cmake git libopenblas-dev && rm -rf /var/lib/apt/lists/*
|
| 7 |
+
|
| 8 |
+
# Install Python requirements
|
| 9 |
+
RUN pip install --no-cache-dir fastapi uvicorn llama-cpp-python pydantic
|
| 10 |
+
|
| 11 |
+
COPY . .
|
| 12 |
+
|
| 13 |
+
# Expose port 7860 (Hugging Face default)
|
| 14 |
+
EXPOSE 7860
|
| 15 |
+
|
| 16 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|