Spaces:
Runtime error
Runtime error
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"] |