File size: 686 Bytes
a34c67b
c61097a
 
1f32c41
 
 
 
 
a34c67b
1f32c41
c61097a
1f32c41
 
 
 
61f3310
 
7af46c8
a9b6b8d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# --doc: https://huggingface.co/docs/hub/spaces-sdks-docker

FROM python:3.10
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH
WORKDIR /home/user/app
# --cp w/ explicit user permissions โœ๐Ÿฝ๐ŸŽฌโœ…๐Ÿซต๐Ÿผ
COPY --chown=user:user requirements.txt .
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=user:user . .
ENV CHAINLIT_HOME=/home/user/.chainlit \
    XDG_CACHE_HOME=/home/user/.cache
RUN mkdir -p $CHAINLIT_HOME $XDG_CACHE_HOME
#CMD rm -f /home/user/.local/lib/python3.10/site-packages/chainlit/config.py && \
    #chainlit run app.py -h 0.0.0.0 -p 7860

CMD chainlit run --host 0.0.0.0 --port 7860 app.py