Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +4 -13
Dockerfile
CHANGED
@@ -16,20 +16,11 @@ WORKDIR /
|
|
16 |
|
17 |
# Copy your FastAPI application code (assuming 'main.py')
|
18 |
COPY main.py .
|
19 |
-
|
20 |
# # Start Ollama server in the background
|
21 |
# RUN nohup ollama &
|
22 |
|
23 |
-
RUN curl -fsSL https://ollama.com/install.sh |
|
24 |
-
|
25 |
-
# RUN ollama serve
|
26 |
-
|
27 |
-
# RUN service ollama start
|
28 |
-
# Download the Mistral model (modify URL if needed)
|
29 |
-
RUN ollama run llama2-uncensored
|
30 |
-
|
31 |
-
# Expose Ollama server port (commented out)
|
32 |
-
# EXPOSE 11434 # Not required for this approach
|
33 |
|
34 |
-
|
35 |
-
CMD [ "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860" ]
|
|
|
16 |
|
17 |
# Copy your FastAPI application code (assuming 'main.py')
|
18 |
COPY main.py .
|
19 |
+
COPY entrypoint.sh .
|
20 |
# # Start Ollama server in the background
|
21 |
# RUN nohup ollama &
|
22 |
|
23 |
+
RUN curl -fsSL https://ollama.com/install.sh | sh
|
24 |
+
RUN chmod +x ./entrypoint.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
+
ENTRYPOINT ["./entrypoint.sh"]
|
|