File size: 984 Bytes
976166f
 
e92de71
 
 
976166f
 
 
 
 
 
 
 
e92de71
 
80e3247
 
588011f
e92de71
de64de6
 
e92de71
 
 
de64de6
 
 
 
e92de71
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
FROM python:3.11

# 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
RUN chmod 777 /code/instance/log.json
RUN chmod 777 /code/instance/local.db

# for huggingface
CMD ["panel", "serve", "portfolioEditingPage.py", "index_page.py","--setup","backgroundTask.py", "--address", "0.0.0.0", "--port", "7860", "--allow-websocket-origin", "lamonkey-portfolio-management.hf.space"]

# Start the Panel app
# CMD ["panel", "serve", "portfolioEditingPage.py", "index_page.py",'--setup','backgroundTask.py', "--address", "0.0.0.0", "--port", "7860", "--allow-websocket-origin", "localhost:5006"]

# permission required by huggingface
RUN mkdir /.cache
RUN chmod 777 /.cache
RUN mkdir .chroma
RUN chmod 777 .chroma