SmartPlate / Dockerfile
Aishrica's picture
initial commit
50ba6d4
Raw
History Blame Contribute Delete
491 Bytes
# Use a slim Python base image for smaller container size
FROM python:3.12-slim
# Prevent Python from writing .pyc files and enable unbuffered logging
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app
# Install dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Copy project files
COPY . /app
# Expose the FastAPI port
EXPOSE 7860
# Start the FastAPI application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]