Spaces:
Running
Running
Update Dockerfile
Browse files- 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
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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"]
|