Spaces:
Runtime error
Runtime error
Deepak Yadav
commited on
Commit
·
e876950
1
Parent(s):
97fbb23
updated new version deepseek-r1
Browse files- Dockerfile +7 -6
Dockerfile
CHANGED
|
@@ -7,6 +7,9 @@ RUN apt-get update && apt-get install -y curl
|
|
| 7 |
# Install Ollama
|
| 8 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
| 9 |
|
|
|
|
|
|
|
|
|
|
| 10 |
# Install Python dependencies
|
| 11 |
COPY requirements.txt .
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
@@ -14,10 +17,8 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 14 |
# Copy app files
|
| 15 |
COPY . .
|
| 16 |
|
| 17 |
-
# Expose
|
| 18 |
-
EXPOSE 11434
|
| 19 |
-
|
| 20 |
-
# Start Ollama in the background
|
| 21 |
-
RUN ollama serve & sleep 10 & ollama pull deepseek-r1:1.5b
|
| 22 |
|
| 23 |
-
|
|
|
|
|
|
| 7 |
# Install Ollama
|
| 8 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
| 9 |
|
| 10 |
+
# Pull the Ollama model in advance
|
| 11 |
+
RUN ollama pull deepseek-r1:1.5b
|
| 12 |
+
|
| 13 |
# Install Python dependencies
|
| 14 |
COPY requirements.txt .
|
| 15 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 17 |
# Copy app files
|
| 18 |
COPY . .
|
| 19 |
|
| 20 |
+
# Expose necessary ports
|
| 21 |
+
EXPOSE 11434 8501
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
+
# Start both Ollama and Streamlit
|
| 24 |
+
CMD ["bash", "-c", "ollama serve & sleep 5 && streamlit run app.py --server.port 8501 --server.enableCORS false --server.enableXsrfProtection false"]
|