anatomy / Dockerfile
axjh03's picture
Initial commit
2371911
raw
history blame
1.03 kB
# Use the official Python image as base
FROM python:3.9-slim
# Create a non-root user
RUN useradd -m -u 1000 user
# Set the working directory in the container
WORKDIR /app
# Install system dependencies
RUN apt-get update && \
apt-get install -y gcc python3-dev python3-venv && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Copy requirements file
COPY --chown=user ./requirements.txt requirements.txt
# Install dependencies
RUN python3 -m venv env && \
/bin/bash -c "source env/bin/activate && pip install --no-cache-dir --upgrade -r requirements.txt" && \
/bin/bash -c "source env/bin/activate && pip install chainlit langchain_community"
# Make port 7680 available to the world outside the container
EXPOSE 7680
# Copy the application code into the container
COPY --chown=user . /app
# Run the application
CMD ["/bin/bash", "-c", "source env/bin/activate && uvicorn app:app --host 0.0.0.0 --port 7680 && python3 downloadLLM.py && python3 ingest.py && chainlit run app.py --host 0.0.0.0 --port 7680"]