FROM pytorch/pytorch:1.9.0-cuda10.2-cudnn7-runtime RUN pip install "stanza>=1.2" WORKDIR /app COPY requirements.txt /app/requirements.txt RUN pip install -r requirements.txt && pip install requests COPY . /app ENV STANZA_RESOURCES_DIR=/app/stanza_resources RUN python - <<'PY' import stanza stanza.download('pt', model_dir='/app/stanza_resources') PY ENV PORT=7860 CMD sh -c 'gunicorn --bind 0.0.0.0:${PORT:-7860} --timeout 1200 app:app'