chenhaodev commited on
Commit
eca350d
·
verified ·
1 Parent(s): 2a1c8be

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -4
Dockerfile CHANGED
@@ -5,13 +5,21 @@ FROM python:3.10 as base
5
  #ENV MODEL=NeverSleep/CausalLM-RP-34B-GGUF
6
  ENV MODEL=mradermacher/CausalLM-RP-34B-GGUF
7
  ENV QUANT=IQ3_M
8
- ENV CHAT_TEMPLATE=chatml
 
 
 
 
 
 
9
 
10
  # Set the working directory
11
- WORKDIR /app
 
12
 
13
  # Install Python requirements
14
- COPY ./requirements.txt /app/
 
15
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
16
 
17
  # Download model
@@ -20,7 +28,8 @@ RUN MODEL_NAME_FILE=$(echo ${MODEL#*/} | tr '[:upper:]' '[:lower:]' | sed 's/-gg
20
  wget https://huggingface.co/mradermacher/CausalLM-RP-34B-GGUF/resolve/main/CausalLM-RP-34B.IQ3_M.gguf -O model.gguf
21
 
22
  # Copy the rest of your application
23
- COPY . .
 
24
 
25
  # Command to run the application
26
  CMD ["python", "app.py"]
 
5
  #ENV MODEL=NeverSleep/CausalLM-RP-34B-GGUF
6
  ENV MODEL=mradermacher/CausalLM-RP-34B-GGUF
7
  ENV QUANT=IQ3_M
8
+ #ENV CHAT_TEMPLATE=chatml
9
+
10
+ # Set up a new user named "user" with user ID 1000
11
+ RUN useradd -m -u 1000 user
12
+ USER user
13
+ ENV HOME=/home/user \
14
+ PATH=/home/user/.local/bin:$PATH
15
 
16
  # Set the working directory
17
+ #WORKDIR /app
18
+ WORKDIR $HOME/app
19
 
20
  # Install Python requirements
21
+ #COPY ./requirements.txt /app/
22
+ COPY ./requirements.txt $HOME/app/
23
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
24
 
25
  # Download model
 
28
  wget https://huggingface.co/mradermacher/CausalLM-RP-34B-GGUF/resolve/main/CausalLM-RP-34B.IQ3_M.gguf -O model.gguf
29
 
30
  # Copy the rest of your application
31
+ #COPY . .
32
+ COPY --chown=user . $HOME/app
33
 
34
  # Command to run the application
35
  CMD ["python", "app.py"]