camparchimedes
commited on
Update Dockerfile
Browse files- Dockerfile +12 -6
Dockerfile
CHANGED
@@ -3,12 +3,18 @@
|
|
3 |
|
4 |
|
5 |
FROM python:3.10
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
8 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
9 |
-
COPY . .
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
|
|
|
14 |
|
|
|
3 |
|
4 |
|
5 |
FROM python:3.10
|
6 |
+
RUN useradd -m -u 1000 user
|
7 |
+
USER user
|
8 |
+
ENV HOME=/home/user \
|
9 |
+
PATH=/home/user/.local/bin:$PATH
|
10 |
+
WORKDIR /home/user/app
|
11 |
+
# --cp w/ explicit user permissions # 鉁嶐煆金煄渽馃馃徏
|
12 |
+
COPY --chown=user:user requirements.txt .
|
13 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
14 |
+
COPY --chown=user:user . .
|
15 |
+
ENV CHAINLIT_HOME=/home/user/.chainlit \
|
16 |
+
XDG_CACHE_HOME=/home/user/.cache
|
17 |
+
RUN mkdir -p $CHAINLIT_HOME $XDG_CACHE_HOME
|
18 |
|
19 |
+
CMD ["chainlit", "run", "app.py", "-h", "0.0.0.0", "-p", "7860"]
|
20 |
|