pdf-annotator-fastapi / Dockerfile
samyak152002's picture
Update Dockerfile
8cb6f07 verified
raw
history blame contribute delete
665 Bytes
# Dockerfile
# Use the official Python image from the Docker Hub
FROM python:3.10-slim
# Set environment variables
ENV PYTHONUNBUFFERED=1
# Create a working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy the requirements file
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code, including templates
COPY app /app/app
# Expose port 8000 for the API
EXPOSE 8000
# Command to run the application
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]