19 lines
499 B
Docker
19 lines
499 B
Docker
# syntax=docker/dockerfile:1.7
|
|
|
|
FROM quay.io/0voice/python:3.10-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
ENV PORT=3002 \
|
|
PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple \
|
|
PIP_TRUSTED_HOST=pypi.tuna.tsinghua.edu.cn
|
|
|
|
COPY requirements.txt ./
|
|
|
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
python -m pip install --upgrade pip && \
|
|
python -m pip install --root-user-action=ignore -r requirements.txt
|
|
|
|
COPY tokenizer.py ./
|
|
|
|
CMD ["sh", "-c", "nuxt --port ${PORT} --module tokenizer.py --workers 2"] |