cigol123 commited on
Commit
7f1d5a7
·
verified ·
1 Parent(s): 2b3e83f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -8
Dockerfile CHANGED
@@ -1,16 +1,21 @@
1
- FROM python:3.9-slim
 
 
 
 
 
 
2
 
3
  WORKDIR /app
4
 
5
- RUN apt-get update && apt-get install -y wget
 
6
 
7
- ARG HF_TOKEN
8
- ENV HF_TOKEN=${HF_TOKEN}
9
- RUN wget https://huggingface.co/cigol123/YUGO-GPT-Q4_0-GGUF/resolve/main/yugogpt-q4_0.gguf --header="Authorization: Bearer ${HF_TOKEN}"
10
 
11
- COPY requirements.txt .
12
- RUN pip install -r requirements.txt
13
 
14
- COPY . .
15
 
16
  CMD ["python", "app.py"]
 
 
1
+ FROM python:3.9
2
+
3
+ RUN useradd -m -u 1000 user
4
+
5
+ USER user
6
+
7
+ ENV PATH="/home/user/.local/bin:$PATH"
8
 
9
  WORKDIR /app
10
 
11
+ # Download YUGO model
12
+ RUN wget https://huggingface.co/cigol123/YUGO-GPT-Q4_0-GGUF/resolve/main/yugogpt-q4_0.gguf
13
 
14
+ COPY --chown=user ./requirements.txt requirements.txt
 
 
15
 
16
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
 
17
 
18
+ COPY --chown=user . /app
19
 
20
  CMD ["python", "app.py"]
21
+