Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +4 -10
Dockerfile
CHANGED
@@ -7,17 +7,11 @@ WORKDIR /app
|
|
7 |
# Copy project files
|
8 |
COPY . /app
|
9 |
|
10 |
-
# Install
|
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 |
-
# Start Ollama in the background before pulling the model
|
17 |
-
RUN ollama serve & sleep 5 && ollama pull deepseek-coder-v2
|
18 |
|
19 |
# Expose port 7860 for FastAPI
|
20 |
EXPOSE 7860
|
21 |
|
22 |
-
# Start
|
23 |
-
CMD
|
|
|
7 |
# Copy project files
|
8 |
COPY . /app
|
9 |
|
10 |
+
# Install dependencies
|
11 |
+
RUN pip install --no-cache-dir fastapi uvicorn torch torchvision torchaudio transformers sentencepiece accelerate
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
# Expose port 7860 for FastAPI
|
14 |
EXPOSE 7860
|
15 |
|
16 |
+
# Start the FastAPI server
|
17 |
+
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
|