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