Ved Gupta commited on
Commit
1fe1124
·
1 Parent(s): 652e070

Update Dockerfile to download and copy AI models, set user and environment variables

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -7
Dockerfile CHANGED
@@ -1,13 +1,19 @@
1
  FROM quay.io/go-skynet/local-ai:v2.7.0-ffmpeg-core
2
 
3
- # Add the environment variable
4
- ENV REBUILD=true
5
 
6
- # RUN wget -q "https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GGUF/resolve/main/mistral-7b-instruct-v0.2.Q4_0.gguf" -O models/mistral-7b-instruct-v0.2.Q4_0.gguf
7
- # RUN wget -q "https://huggingface.co/TheBloke/Luna-AI-Llama2-Uncensored-GGUF/resolve/main/luna-ai-llama2-uncensored.Q4_0.gguf" -O models/luna-ai-llama2
8
- # COPY models/* models/
 
 
 
 
 
9
 
10
  EXPOSE 8080
11
 
12
- # CMD ["--models-path", "./models", "--context-size", "700", "--threads", "4"]
13
- CMD ["phi-2"]
 
 
 
 
1
  FROM quay.io/go-skynet/local-ai:v2.7.0-ffmpeg-core
2
 
 
 
3
 
4
+ RUN wget -q "https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GGUF/resolve/main/mistral-7b-instruct-v0.2.Q4_0.gguf" -O models/mistral-7b-instruct-v0.2.Q4_0.gguf
5
+ RUN wget -q "https://huggingface.co/TheBloke/Luna-AI-Llama2-Uncensored-GGUF/resolve/main/luna-ai-llama2-uncensored.Q4_0.gguf" -O models/luna-ai-llama2
6
+ COPY models/* models/
7
+
8
+ RUN useradd -m -u 1000 user
9
+ USER user
10
+ ENV HOME=/home/user \
11
+ PATH=/home/user/.local/bin:$PATH
12
 
13
  EXPOSE 8080
14
 
15
+ WORKDIR $HOME
16
+ COPY --chown=user . $HOME
17
+
18
+
19
+ CMD ["--models-path", "/app/models", "--context-size", "700", "--threads", "4"]