2023-02-18 17:13:37 +02:00
|
|
|
FROM python:3.10
|
2022-03-27 21:58:54 +02:00
|
|
|
|
2023-02-18 17:13:37 +02:00
|
|
|
ENV TRANSFORMERS_CACHE=/cache
|
2023-02-22 18:53:59 +02:00
|
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
2022-03-27 21:58:54 +02:00
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
2023-02-22 18:53:59 +02: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 21:58:54 +02:00
|
|
|
|
|
|
|
COPY . .
|
2023-02-23 17:54:04 +02:00
|
|
|
|
|
|
|
CMD ["python", "src/main.py"]
|