MedicalQA / Dockerfile
mwitiderrick's picture
Update Dockerfile
f6fa8c1 verified
raw
history blame contribute delete
676 Bytes
FROM python:3.11
# Create a non-root user
RUN useradd -m -u 1000 user
USER user
# Set environment variables
ENV HOME=/home/user \
VIRTUAL_ENV=/home/user/venv \
PATH="/home/user/.local/bin:/home/user/venv/bin:$PATH"
# Create virtual environment
RUN python -m venv $VIRTUAL_ENV
# Set working directory
WORKDIR /app
# Copy and install dependencies
COPY --chown=user requirements.txt .
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
# Copy source code
COPY --chown=user . .
# Expose port (optional but good practice)
EXPOSE 7860
# Launch app
CMD ["python", "-m", "chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]