Update Dockerfile
Browse files- Dockerfile +10 -0
Dockerfile
CHANGED
|
@@ -46,6 +46,16 @@ COPY ./app.py /code/app.py
|
|
| 46 |
RUN mkdir -p ./sfbook
|
| 47 |
RUN chmod 777 ./sfbook
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
# Run app.py when the container launches
|
| 50 |
CMD ["python", "app.py"]
|
| 51 |
|
|
|
|
| 46 |
RUN mkdir -p ./sfbook
|
| 47 |
RUN chmod 777 ./sfbook
|
| 48 |
|
| 49 |
+
|
| 50 |
+
# Create the directory and set up the environment configuration for ollama.service
|
| 51 |
+
RUN mkdir -p /etc/systemd/system/ollama.service.d && \
|
| 52 |
+
echo '[Service]' >> /etc/systemd/system/ollama.service.d/environment.conf && \
|
| 53 |
+
echo 'Environment="OLLAMA_HOST=0.0.0.0:11434"' >> /etc/systemd/system/ollama.service.d/environment.conf
|
| 54 |
+
|
| 55 |
+
# Reload systemd manager configuration and restart the ollama service
|
| 56 |
+
RUN systemctl daemon-reload && \
|
| 57 |
+
systemctl restart ollama
|
| 58 |
+
|
| 59 |
# Run app.py when the container launches
|
| 60 |
CMD ["python", "app.py"]
|
| 61 |
|