Spaces:
Runtime error
Runtime error
| # FROM python:3.9 | |
| # FROM node:19-slim | |
| # RUN apt-get update && \ | |
| # apt-get install -y \ | |
| # bash \ | |
| # git git-lfs \ | |
| # wget curl procps \ | |
| # htop vim nano && \ | |
| # rm -rf /var/lib/apt/lists/* | |
| # # RUN useradd -m -u 1000 user | |
| # # USER user | |
| # # ENV HOME=/home/user \ | |
| # # PATH=/home/user/.local/bin:$PATH | |
| # WORKDIR /app | |
| # COPY --link ./ /app | |
| # RUN chown 1000 /app | |
| # USER 1000 | |
| # # COPY --chown=user . $HOME/app | |
| # # COPY ./requirements.txt ~/app/requirements.txt | |
| # RUN pip install -r requirements.txt | |
| # # COPY . . | |
| # CMD ["chainlit", "run", "chain_app.py", "--port", "7860" ,"-h"] | |
| # Start from a Python base image | |
| FROM python:3.9 | |
| # Install necessary packages | |
| RUN apt-get update && \ | |
| apt-get install -y \ | |
| bash \ | |
| git git-lfs \ | |
| wget curl procps \ | |
| htop vim nano && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Create a new user | |
| RUN useradd -m -u 1000 user | |
| # Set environment variables | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy the application files | |
| COPY ./ /app | |
| # Change ownership of the application files | |
| RUN chown -R user:user /app | |
| # Switch to the new user | |
| USER user | |
| # Copy and install Python dependencies | |
| COPY --chown=user:user requirements.txt $HOME/app/requirements.txt | |
| RUN pip install --no-cache-dir -r $HOME/app/requirements.txt | |
| # Set the command to run the application | |
| CMD ["chainlit", "run", "chain_app.py", "-w", "--port", "7860" ,"-h"] | |