LLM-app-Beond-ChatGPT / Dockerfile
sahanes's picture
fixed-public
6b10c3a
raw
history blame contribute delete
No virus
1.25 kB
FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && \
apt-get install -y build-essential gfortran
# Create a non-root user
RUN useradd -m -u 1000 user
USER user
# Set environment variables
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# Set working directory
WORKDIR $HOME/app
# Copy requirements file and install dependencies
COPY --chown=user . $HOME/app
COPY ./requirements.txt $HOME/app/requirements.txt
RUN pip install --user -r requirements.txt
# Copy application code
COPY . .
# Command to run the application
CMD ["chainlit", "run", "app.py", "--port", "7860"]
# FROM python:3.11
# RUN useradd -m -u 1000 user
# USER user
# ENV HOME=/home/user \
# PATH=/home/user/.local/bin:$PATH
# WORKDIR $HOME/app
# COPY --chown=user . $HOME/app
# COPY ./requirements.txt ~/app/requirements.txt
# RUN pip install -r requirements.txt
# COPY . .
# CMD ["chainlit", "run", "app.py", "--port", "7860"]
# COPY --chown=user requirements.txt $HOME/app/requirements.txt
# RUN pip install --user -r requirements.txt
# # Copy application code
# COPY --chown=user . $HOME/app
# Expose the port the app runs on
# EXPOSE 7860
# Command to run the application
# CMD ["chainlit", "run", "app.py", "--port", "7860"]