Skip to content

Instantly share code, notes, and snippets.

@lmwilkin
lmwilkin / Dockerfile
Created August 26, 2020 17:24
GPU enable inference container for Transformers
FROM tiangolo/uvicorn-gunicorn-machine-learning:cuda9.1-python3.7
ENV PORT 40003
ENV APP_MODULE app.api:app
ENV LOG_LEVEL debug
ENV WEB_CONCURRENCY 2
COPY ./requirements.txt ./requirements.txt
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir --upgrade torch transformers
RUN pip install --no-cache-dir fastapi