ai-text-summarizer / Dockerfile
Surbhi
Using BERT and GPT-4
a238751
raw
history blame contribute delete
498 Bytes
# Use Python 3.9
FROM python:3.9
# Create a non-root user
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
# Set working directory
WORKDIR /app
# Copy requirements and install dependencies
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Copy the rest of the application
COPY --chown=user . /app
# Run the FastAPI app with Uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]