Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use Python as base image
|
| 2 |
+
FROM python:3.10
|
| 3 |
+
|
| 4 |
+
# Set working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy project files
|
| 8 |
+
COPY . /app
|
| 9 |
+
|
| 10 |
+
# Install FastAPI dependencies
|
| 11 |
+
RUN pip install --no-cache-dir fastapi uvicorn
|
| 12 |
+
|
| 13 |
+
# Install Ollama
|
| 14 |
+
RUN curl -fsSL https://ollama.com/install.sh | sh
|
| 15 |
+
|
| 16 |
+
# Pull DeepSeek-Coder-V2 Model
|
| 17 |
+
RUN ollama pull deepseek-coder-v2
|
| 18 |
+
|
| 19 |
+
# Expose port 7860 for FastAPI
|
| 20 |
+
EXPOSE 7860
|
| 21 |
+
|
| 22 |
+
# Start the FastAPI server
|
| 23 |
+
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|