lavanjv commited on
Commit
3b5e946
·
1 Parent(s): a140fe2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -4
Dockerfile CHANGED
@@ -13,12 +13,15 @@ RUN chown -R myuser:myuser /app /home/myuser
13
  # Switch to the non-root user
14
  USER myuser
15
 
 
 
 
 
 
 
16
  # Copy the entire contents of the local directory into the container
17
  COPY . .
18
 
19
- # Download the model file
20
- RUN wget https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/resolve/main/llama-2-7b-chat.ggmlv3.q8_0.bin
21
-
22
  # Install chainlit and add it to PATH
23
  RUN pip install chainlit --user
24
 
@@ -31,5 +34,5 @@ RUN pip install -r requirements.txt
31
  # Expose port 7860 internally in the container
32
  EXPOSE 7860
33
 
34
- # Run the ChainlIt command
35
  CMD ["chainlit", "run", "model.py", "-w", "--port", "7860"]
 
13
  # Switch to the non-root user
14
  USER myuser
15
 
16
+ # Set the Hugging Face token as a build argument
17
+ ARG HUGGINGFACE_TOKEN
18
+
19
+ # Run huggingface-cli login with the provided token
20
+ RUN huggingface-cli login --token $HUGGINGFACE_TOKEN
21
+
22
  # Copy the entire contents of the local directory into the container
23
  COPY . .
24
 
 
 
 
25
  # Install chainlit and add it to PATH
26
  RUN pip install chainlit --user
27
 
 
34
  # Expose port 7860 internally in the container
35
  EXPOSE 7860
36
 
37
+ # Run the ChainLit command
38
  CMD ["chainlit", "run", "model.py", "-w", "--port", "7860"]