2023-02-18 08:13:37 -07:00
|
|
|
FROM python:3.10
|
2022-03-27 12:58:54 -07:00
|
|
|
|
2023-02-18 08:13:37 -07:00
|
|
|
ENV TRANSFORMERS_CACHE=/cache
|
2023-02-22 09:53:59 -07:00
|
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
2022-03-27 12:58:54 -07:00
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
2023-02-22 09:53:59 -07:00
|
|
|
RUN python -m venv /opt/venv
|
|
|
|
ENV PATH="/opt/venv/bin:$PATH"
|
|
|
|
|
|
|
|
RUN pip install --no-cache-dir torch==1.13.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
|
|
|
|
RUN pip install transformers tqdm numpy scikit-learn scipy nltk sentencepiece flask Pillow
|
|
|
|
RUN pip install --no-deps sentence-transformers
|
2022-03-27 12:58:54 -07:00
|
|
|
|
|
|
|
COPY . .
|
2023-02-23 08:54:04 -07:00
|
|
|
|
|
|
|
CMD ["python", "src/main.py"]
|