skin-analyzer / Dockerfile
ffplima's picture
Create Dockerfile
cc72a64 verified
Raw History Blame Contribute Delete
508 Bytes
FROM python:3.11-slim
# libs nativas para OpenCV/Mediapipe
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 libglib2.0-0 libxext6 libsm6 libstdc++6 libgcc-s1 libgomp1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# deps Python
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# app
COPY app ./app
# a porta do Spaces vem via env PORT; use-a no uvicorn
ENV PORT=7860
EXPOSE ${PORT}
CMD bash -lc "uvicorn app.main:app --host 0.0.0.0 --port ${PORT}"