XY26 commited on
Commit
fecbfc9
·
verified ·
1 Parent(s): d13ada5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -11
Dockerfile CHANGED
@@ -1,19 +1,17 @@
1
- FROM python:3.10
 
2
 
3
- # 1. Setup User (Hugging Face Security Requirement)
 
 
 
 
 
4
  RUN useradd -m -u 1000 user
5
  USER user
6
  ENV HOME=/home/user \
7
  PATH=/home/user/.local/bin:$PATH
8
-
9
  WORKDIR $HOME/app
10
-
11
  COPY --chown=user . $HOME/app
12
 
13
- # 2. Upgrade pip to ensure it picks the correct "Manylinux" wheel (fixes the musl error)
14
- RUN pip install --no-cache-dir --upgrade pip
15
-
16
- # 3. Install dependencies from requirements.txt
17
- RUN pip install --no-cache-dir -r requirements.txt
18
-
19
- CMD ["python", "app.py"]
 
1
+ # Use the official image. The engine is already installed here.
2
+ FROM ghcr.io/abetlen/llama-cpp-python:latest
3
 
4
+ # Switch to root to install Gradio
5
+ USER root
6
+ RUN python3 -m pip install --upgrade pip
7
+ RUN python3 -m pip install gradio huggingface_hub
8
+
9
+ # Setup User (Required by Hugging Face)
10
  RUN useradd -m -u 1000 user
11
  USER user
12
  ENV HOME=/home/user \
13
  PATH=/home/user/.local/bin:$PATH
 
14
  WORKDIR $HOME/app
 
15
  COPY --chown=user . $HOME/app
16
 
17
+ CMD ["python3", "app.py"]