st192011 commited on
Commit
22df6a1
·
verified ·
1 Parent(s): 642c4d5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -16
Dockerfile CHANGED
@@ -1,30 +1,20 @@
1
  FROM python:3.10-slim
2
 
3
- # 1. System dependencies
4
- RUN apt-get update && apt-get install -y \
5
- git \
6
- build-essential \
7
- cmake \
8
- wget \
9
- && rm -rf /var/lib/apt/lists/*
10
-
11
- # 2. Setup User 1000 (Required for HF Spaces)
12
  RUN useradd -m -u 1000 user
13
  USER user
14
  ENV HOME=/home/user \
15
  PATH=/home/user/.local/bin:$PATH
 
16
  WORKDIR $HOME/app
17
 
18
- # 3. Install requirements
19
- # We install llama-cpp-python first to utilize caching
20
  RUN pip install --no-cache-dir \
21
- llama-cpp-python==0.2.90 \
22
  huggingface_hub \
23
- gradio \
24
- python-dotenv
25
 
26
- # 4. Copy application files
27
  COPY --chown=user . .
28
 
29
- # 5. Start the app
30
  CMD ["python", "app.py"]
 
1
  FROM python:3.10-slim
2
 
3
+ # 1. Setup User 1000
 
 
 
 
 
 
 
 
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
+ # 2. Install dependencies (This will use pre-built WHEELS - no compiling)
 
12
  RUN pip install --no-cache-dir \
13
+ llama-cpp-python \
14
  huggingface_hub \
15
+ gradio
 
16
 
17
+ # 3. Copy app
18
  COPY --chown=user . .
19
 
 
20
  CMD ["python", "app.py"]