Spaces:
Sleeping
Sleeping
File size: 736 Bytes
ea67231 ec67e7b b321778 ea67231 7f2ede9 ea67231 b321778 7f2ede9 b321778 ea67231 7f2ede9 ea67231 b321778 ea67231 b321778 ec596e6 |
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 |
# Use a Python 3.12 base image
FROM python:3.12
# Create a user and set environment variables
RUN useradd -m -u 1000 user && \
mkdir -p /home/user/app/files && \
chown -R user:user /home/user/app && \
apt-get update && \
apt-get install -y tesseract-ocr poppler-utils && \
rm -rf /var/lib/apt/lists/*
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set the working directory
WORKDIR $HOME/app
# Copy your application code and requirements.txt
COPY --chown=user . .
COPY --chown=user requirements.txt $HOME/app/requirements.txt
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Specify the command to run your application
CMD ["chainlit", "run", "app.py", "--port", "7860"] |