barbie-raq-hf / Dockerfile
lgfunderburk's picture
run app with requirements
d05ba06
raw
history blame contribute delete
774 Bytes
# Use the official Python image as the base image
FROM python:3.10
# Set the working directory to /app
WORKDIR /app
# Create a new user and switch to this user
RUN useradd -m -u 1000 user
USER user
# Set environment variables for the new user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set the working directory for the user
WORKDIR $HOME/app
# Copy the current directory contents into the container at /app
COPY --chown=user . $HOME/app
# Copy requirements file
COPY ./requirements.txt ~/app/requirements.txt
# Upgrade pip and install poetry
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Copy the rest of the application code
COPY . .
# Define the command to run the app
CMD [ "chainlit", "run", "app.py", "--port", "7860"]