FROM python:3.11-slim

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt \
    -i https://mirrors.aliyun.com/pypi/simple/ \
    --trusted-host mirrors.aliyun.com

COPY . .

ENV TRANSLATE_MAX_WORKERS=4

EXPOSE 8000

CMD ["python", "translate_server.py"]
