Spaces:
Paused
Paused
| # Use the official Python 3.12 image | |
| FROM python:3.12 | |
| # Set the working directory | |
| WORKDIR /app | |
| # Create and switch to a non-root user | |
| RUN useradd -m -u 1000 user | |
| RUN chown -R user:user /app | |
| USER user | |
| # Set environment variables for the user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| # Install dependencies | |
| COPY --chown=user ./requirements.txt . | |
| RUN pip install -r requirements.txt | |
| # Copy all project files | |
| COPY --chown=user . . | |
| # Expose the port | |
| EXPOSE 7860 | |
| # The simple, standard command the platform expects | |
| CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860", "--headless"] |