Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files12312678345678910111213141516101718191213202115162223# Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker# you will also find guides on how best to write your Dockerfile
FROM python:3.9
RUN useradd -m -u 1000 userUSER userENV PATH="/home/user/.local/bin:$PATH"# Install system dependencies for OpenCVRUN apt-get update && apt-get install -y \ libgl1-mesa-glx \ libglib2.0-0 \ libsm6 \ libxrender1 \ libxext6 \ && rm -rf /var/lib/apt/lists/*
WORKDIR /code
COPY ./requirements.txt /code/requirements.txtRUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
WORKDIR /app# For headless matplotlibENV MPLBACKEND=Agg
COPY --chown=user ./requirements.txt requirements.txtRUN pip install --no-cache-dir --upgrade -r requirements.txtCOPY . /code/
COPY --chown=user . /appCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]# Make sure the app.py file is correctly namedCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]Dockerfile+18-11