Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +7 -4
Dockerfile
CHANGED
|
@@ -5,15 +5,18 @@ FROM ollama/ollama
|
|
| 5 |
RUN apt-get update && apt-get install -y python3 python3-pip
|
| 6 |
RUN pip3 install fastapi uvicorn requests
|
| 7 |
|
| 8 |
-
#
|
|
|
|
|
|
|
|
|
|
| 9 |
COPY entrypoint.sh /entrypoint.sh
|
| 10 |
RUN chmod +x /entrypoint.sh
|
| 11 |
|
| 12 |
# Copy the FastAPI app
|
| 13 |
COPY app.py /app.py
|
| 14 |
|
| 15 |
-
# Expose the port for the FastAPI server
|
| 16 |
EXPOSE 8000
|
| 17 |
|
| 18 |
-
# Run the entrypoint script
|
| 19 |
-
CMD ["/entrypoint.sh"]
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y python3 python3-pip
|
| 6 |
RUN pip3 install fastapi uvicorn requests
|
| 7 |
|
| 8 |
+
# Create a directory for persistent storage (Hugging Face Spaces uses /data)
|
| 9 |
+
RUN mkdir -p /data/.ollama && ln -s /data/.ollama /root/.ollama
|
| 10 |
+
|
| 11 |
+
# Copy the entrypoint script
|
| 12 |
COPY entrypoint.sh /entrypoint.sh
|
| 13 |
RUN chmod +x /entrypoint.sh
|
| 14 |
|
| 15 |
# Copy the FastAPI app
|
| 16 |
COPY app.py /app.py
|
| 17 |
|
| 18 |
+
# Expose the port for the FastAPI server (Hugging Face Spaces uses 8000)
|
| 19 |
EXPOSE 8000
|
| 20 |
|
| 21 |
+
# Run the entrypoint script using a shell
|
| 22 |
+
CMD ["/bin/bash", "/entrypoint.sh"]
|