Spaces:
Sleeping
Sleeping
File size: 630 Bytes
ce74f64 20fd337 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
FROM python:3.9
RUN pip install --upgrade pip
# Create a user and set up the environment
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
# Add this line to copy the data directory
COPY ./data /home/user/app/data
# Copy only requirements.txt first to leverage Docker cache
COPY --chown=user requirements.txt $HOME/app/requirements.txt
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY --chown=user . $HOME/app
# Run the application
CMD ["chainlit", "run", "app.py", "--port", "7860"]
|