cigol123 commited on
Commit
8de2aa3
·
verified ·
1 Parent(s): a5a0566

Update Dockerfile

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