Spaces:
Sleeping
Sleeping
| # Use the official python 3.10 image | |
| FROM python:3.10-slim-bullseye | |
| # Set the working directory to user's home folder | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| # Copy the requirements to working directory | |
| COPY --chown=user:user ./requirements.txt ./requirements.txt | |
| # Install all packages in requirements.txt | |
| RUN pip install --no-cache-dir --user --upgrade -r ./requirements.txt | |
| COPY --chown=user:user . $HOME/app | |
| EXPOSE 8080 | |
| CMD ["python", "-m", "chainlit", "run", "model.py", "-h", "--port", "8080", "--host", "0.0.0.0"] | |