Spaces:
Running
Running
Bahodir Nematjonov
commited on
Commit
·
a708c46
1
Parent(s):
678475e
updated docker
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
@@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y \
|
|
13 |
# Install Ollama
|
14 |
RUN curl -fsSL https://ollama.ai/install.sh | sh
|
15 |
|
16 |
-
# Copy requirements and install
|
17 |
COPY ./requirements.txt /code/requirements.txt
|
18 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
19 |
|
@@ -37,8 +37,8 @@ COPY --chown=user . $HOME/app
|
|
37 |
# Ensure Ollama has a cache directory
|
38 |
RUN mkdir -p /tmp/ollama_cache
|
39 |
|
40 |
-
#
|
41 |
-
RUN ollama pull llama3.2
|
42 |
|
43 |
# Start Ollama before running FastAPI
|
44 |
CMD ollama serve > /tmp/ollama.log 2>&1 & sleep 5 && uvicorn main:app --host 0.0.0.0 --port 7860
|
|
|
13 |
# Install Ollama
|
14 |
RUN curl -fsSL https://ollama.ai/install.sh | sh
|
15 |
|
16 |
+
# Copy requirements and install dependencies
|
17 |
COPY ./requirements.txt /code/requirements.txt
|
18 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
19 |
|
|
|
37 |
# Ensure Ollama has a cache directory
|
38 |
RUN mkdir -p /tmp/ollama_cache
|
39 |
|
40 |
+
# Start Ollama in the background and pull the model
|
41 |
+
RUN ollama serve > /tmp/ollama.log 2>&1 & sleep 5 && ollama pull llama3.2
|
42 |
|
43 |
# Start Ollama before running FastAPI
|
44 |
CMD ollama serve > /tmp/ollama.log 2>&1 & sleep 5 && uvicorn main:app --host 0.0.0.0 --port 7860
|