2023-03-01 17:48:35 +00:00
|
|
|
FROM python:3.10
|
2023-02-22 16:53:59 +00:00
|
|
|
|
2023-03-01 15:37:12 +00:00
|
|
|
ENV TRANSFORMERS_CACHE=/cache \
|
|
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
|
|
PYTHONUNBUFFERED=1 \
|
2023-03-01 17:48:35 +00:00
|
|
|
PIP_NO_CACHE_DIR=true
|
2023-03-01 15:37:12 +00:00
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
2022-03-27 19:58:54 +00:00
|
|
|
|
2023-03-01 17:48:35 +00:00
|
|
|
RUN python -m venv /opt/venv
|
|
|
|
ENV PATH="/opt/venv/bin:$PATH"
|
|
|
|
|
|
|
|
RUN pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
|
|
|
|
RUN pip install transformers tqdm numpy scikit-learn scipy nltk sentencepiece flask Pillow
|
|
|
|
RUN pip install --no-deps sentence-transformers
|
|
|
|
|
2022-03-27 19:58:54 +00:00
|
|
|
COPY . .
|
2023-02-23 15:54:04 +00:00
|
|
|
|
2023-03-01 17:48:35 +00:00
|
|
|
CMD ["python", "src/main.py"]
|