-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (23 loc) · 1000 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM python:3.11
# Directory to store the code
RUN mkdir /code
# Set up a directory for the persistent volume
VOLUME code/instance
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN python3 -m pip install --no-cache-dir --upgrade pip
RUN python3 -m pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY . /code
# make database writable
RUN chmod 777 /code/instance
# Start the Panel app
# EXPOSE 7860
WORKDIR /code/src
# CMD ["panel", "serve", "editingPage.py", "indexPage.py","--basic-auth", "../instance/credential.json", "--setup","backgroundTask.py", "--address", "0.0.0.0", "--port", "7860", "--allow-websocket-origin", "*"]
# for huggingface
CMD ["panel", "serve", "editingPage.py", "indexPage.py","--setup","backgroundTask.py", "--address", "0.0.0.0", "--port", "7860", "--allow-websocket-origin", "jc-software-risk-monitor-app.hf.space"]
# permission required by huggingface
RUN mkdir /.cache
RUN chmod 777 /.cache
RUN mkdir .chroma
RUN chmod 777 .chroma