Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +4 -4
Dockerfile
CHANGED
@@ -13,11 +13,11 @@ RUN pip install --no-cache-dir fastapi uvicorn
|
|
13 |
# Install Ollama
|
14 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
15 |
|
16 |
-
#
|
17 |
-
RUN ollama pull deepseek-coder-v2
|
18 |
|
19 |
# Expose port 7860 for FastAPI
|
20 |
EXPOSE 7860
|
21 |
|
22 |
-
# Start
|
23 |
-
CMD
|
|
|
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 Ollama and FastAPI server together
|
23 |
+
CMD ollama serve & uvicorn server:app --host 0.0.0.0 --port 7860
|