cometapii commited on
Commit
3718c55
·
verified ·
1 Parent(s): 84aa332

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -14
Dockerfile CHANGED
@@ -1,6 +1,5 @@
1
  FROM ubuntu:22.04
2
 
3
- # Deps
4
  RUN apt-get update && apt-get install -y \
5
  curl \
6
  ca-certificates \
@@ -9,15 +8,13 @@ RUN apt-get update && apt-get install -y \
9
  python3-pip \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # Install Ollama
13
  RUN curl -fsSL https://ollama.ai/install.sh | sh
14
 
15
- # Install Python deps system-wide
16
  COPY requirements.txt /tmp/requirements.txt
17
  RUN pip3 install --no-cache-dir -r /tmp/requirements.txt
18
 
19
- # Create non-root user (HF Spaces requires UID 1000)
20
  RUN useradd -m -u 1000 user
 
21
 
22
  ENV HOME=/home/user \
23
  PATH="/home/user/.local/bin:$PATH" \
@@ -30,15 +27,6 @@ COPY --chown=user entrypoint.sh .
30
  COPY --chown=user proxy.py .
31
  RUN chmod +x entrypoint.sh
32
 
33
- # Pre-pull models at build time
34
- RUN OLLAMA_HOST=127.0.0.1:11434 ollama serve & \
35
- sleep 8 && \
36
- ollama pull deepseek-r1:latest && \
37
- ollama pull qwen3-vl:latest && \
38
- pkill ollama || true
39
-
40
- USER user
41
-
42
  EXPOSE 7860
43
 
44
- CMD ["./entrypoint.sh"]
 
1
  FROM ubuntu:22.04
2
 
 
3
  RUN apt-get update && apt-get install -y \
4
  curl \
5
  ca-certificates \
 
8
  python3-pip \
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
11
  RUN curl -fsSL https://ollama.ai/install.sh | sh
12
 
 
13
  COPY requirements.txt /tmp/requirements.txt
14
  RUN pip3 install --no-cache-dir -r /tmp/requirements.txt
15
 
 
16
  RUN useradd -m -u 1000 user
17
+ USER user
18
 
19
  ENV HOME=/home/user \
20
  PATH="/home/user/.local/bin:$PATH" \
 
27
  COPY --chown=user proxy.py .
28
  RUN chmod +x entrypoint.sh
29
 
 
 
 
 
 
 
 
 
 
30
  EXPOSE 7860
31
 
32
+ CMD ["./entrypoint.sh"]