radinhas commited on
Commit
30dd390
1 Parent(s): d5c01ef

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -2
Dockerfile CHANGED
@@ -4,6 +4,16 @@ COPY . .
4
  RUN pip install -r requirements.txt
5
  VOLUME /data
6
  EXPOSE 23333
7
- RUN mkdir -p /models
8
- RUN chmod 777 /models
 
 
 
 
 
 
 
 
 
 
9
  CMD ["python", "-m", "apis.chat_api"]
 
4
  RUN pip install -r requirements.txt
5
  VOLUME /data
6
  EXPOSE 23333
7
+ RUN useradd -m -u 1000 user
8
+ USER user
9
+ ENV HOME=/home/user \
10
+ PATH=/home/user/.local/bin:$PATH
11
+
12
+ WORKDIR $HOME/app
13
+
14
+ COPY --chown=user . $HOME/app
15
+ RUN mkdir -p $HOME/app/models
16
+ RUN chmod 777 $HOME/app/models
17
+ ENV MODELS_PATH=$HOME/app/models
18
+
19
  CMD ["python", "-m", "apis.chat_api"]