Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +1 -6
Dockerfile
CHANGED
@@ -27,11 +27,6 @@ RUN curl -fsSL https://ollama.com/install.sh | bash
|
|
27 |
# Ensure Ollama is in the system path
|
28 |
ENV PATH="/root/.ollama/bin:$PATH"
|
29 |
|
30 |
-
# Set Ollama's home directory to a writable location
|
31 |
-
ENV OLLAMA_HOME="/app/.ollama"
|
32 |
-
|
33 |
-
# Create the directory with proper permissions
|
34 |
-
RUN mkdir -p $OLLAMA_HOME && chmod -R 777 $OLLAMA_HOME
|
35 |
|
36 |
# Copy the application files
|
37 |
COPY . .
|
@@ -40,4 +35,4 @@ COPY . .
|
|
40 |
EXPOSE 8000
|
41 |
|
42 |
# Start Ollama and FastAPI as root
|
43 |
-
CMD ["sh", "-c", "
|
|
|
27 |
# Ensure Ollama is in the system path
|
28 |
ENV PATH="/root/.ollama/bin:$PATH"
|
29 |
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
# Copy the application files
|
32 |
COPY . .
|
|
|
35 |
EXPOSE 8000
|
36 |
|
37 |
# Start Ollama and FastAPI as root
|
38 |
+
CMD ["sh", "-c", "ollama serve & sleep 5 && ollama pull llama3 && uvicorn main:app --host 0.0.0.0 --port 8000"]
|