multi / Dockerfile
rishab1090's picture
Update Dockerfile
c1291fb verified
Raw
History Blame
723 Bytes
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Avoid .pyc files and enable live logging
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# System dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libglib2.0-0 \
libsm6 \
libxrender1 \
libxext6 \
libgl1 \
&& rm -rf /var/lib/apt/lists/*
# Copy everything
COPY . .
WORKDIR /app
COPY 2.keras /app/
RUN chmod 644 /app/2.keras
# Set model file permissions at build time
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# Expose port
EXPOSE 7860
# Run app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]