gpt-engineer-app[bot] commited on
Commit
8e99bda
·
1 Parent(s): 6670f98
Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ollama/ollama:latest
2
+
3
+ RUN apt-get update && apt-get install -y --no-install-recommends \
4
+ python3 \
5
+ python3-pip \
6
+ curl \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ WORKDIR /app
10
+
11
+ COPY requirements.txt ./
12
+ RUN pip3 install --no-cache-dir -r requirements.txt
13
+
14
+ COPY backend.py ./
15
+
16
+ ENV OLLAMA_HOST=0.0.0.0:11434
17
+ EXPOSE 7860 11434
18
+
19
+ ENTRYPOINT ["/bin/sh", "-lc"]
20
+ CMD ["ollama serve >/tmp/ollama.log 2>&1 & until curl -sf http://127.0.0.1:11434/api/tags >/dev/null; do sleep 2; done; ollama pull qwen3 && uvicorn backend:app --host 0.0.0.0 --port 7860"]