20 lines
437 B
Docker
20 lines
437 B
Docker
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
RUN pip install --no-cache-dir \
|
|
presidio-analyzer \
|
|
"spacy>=3.7" \
|
|
fastapi \
|
|
uvicorn \
|
|
pydantic
|
|
|
|
# Traditional/Simplified Chinese model for PERSON detection.
|
|
# For stronger zh-TW name recall you would swap/augment this in a real engagement.
|
|
RUN python -m spacy download zh_core_web_lg
|
|
|
|
COPY app.py .
|
|
|
|
EXPOSE 5001
|
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "5001"]
|