camparchimedes commited on
Commit
1f32c41
verified
1 Parent(s): d4f8169

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -6
Dockerfile CHANGED
@@ -3,12 +3,18 @@
3
 
4
 
5
  FROM python:3.10
6
- WORKDIR /
7
- COPY requirements.txt .
 
 
 
 
 
8
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
9
- COPY . .
10
- CMD ["chainlit", "run", "app.py", "-h", "0.0.0.0", "-p", "7860"]
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