Add Dockerfile and .dockerignore for face-service

This commit is contained in:
mwpn
2026-03-08 14:37:44 +07:00
parent a26cd2e224
commit fb0ce56bf3
2 changed files with 30 additions and 0 deletions

9
.dockerignore Normal file
View File

@@ -0,0 +1,9 @@
.venv
venv
__pycache__
*.pyc
.git
.gitignore
*.md
.env
.env.*

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM python:3.10-slim
WORKDIR /app
# system dependency untuk insightface / opencv
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 5000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5000"]