CoolFace
Apppublic

F16Sam/awss

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
Dockerfile33 linesDownload Raw Back to root
1# Base image with Python + minimal setup2FROM python:3.10-slim3 4# Set working directory inside container5WORKDIR /code6 7# Copy only requirements first to install dependencies8COPY requirements.txt .9 10# Install system dependencies and Python packages11RUN apt-get update && apt-get install -y \12    gcc \13    libglib2.0-0 \14    libsm6 \15    libxext6 \16    libxrender-dev \17    && rm -rf /var/lib/apt/lists/*18 19# Install Python dependencies20RUN pip install --upgrade pip && pip install -r requirements.txt21 22RUN mkdir -p /code/.cache && chmod -R 777 /code/.cache23ENV HF_HOME=/code/.cache24# Copy Code25COPY . /code26COPY ./models /code/models27RUN chmod -R 777 /code/models28 29# Expose port used by Hugging Face Spaces (default: 7860)30EXPOSE 786031 32# Run FastAPI with Uvicorn on the correct port33CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]