File size: 605 Bytes
412be29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Stage 1: Build

FROM python:3.10-slim-buster as builder

WORKDIR /app

RUN apt-get update && apt-get install -y --no-install-recommends build-essential git
COPY requirements.txt .
RUN pip install --no-cache-dir --user -r requirements.txt

FROM python:3.10-slim-buster

WORKDIR /app

COPY --from=builder /root/.local /root/.local
ENV PATH=/root/.local/bin:$PATH
COPY . .
RUN python -m spacy download ru_core_news_sm && \
    python -m spacy download en_core_web_sm && \
    python -m spacy download zh_core_web_sm
RUN chmod +x entrypoint.sh

EXPOSE 7860
EXPOSE 1337

ENV LANG=ru

CMD ["./entrypoint.sh"]