File size: 881 Bytes
0de232a
fb2eca4
2fbdede
fb2eca4
2fbdede
 
 
2761dd6
 
 
2fbdede
2761dd6
 
 
fb2eca4
 
f132043
 
 
b8e2824
 
f132043
 
 
b96af23
b8e2824
fb2eca4
8d7b928
986e269
 
f554f59
e04d9a6
 
63d94aa
 
 
b96af23
 
8d7b928
fb2eca4
2fbdede
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
30
31
32
33
34
35
36
37
38
39
40
41
FROM python:3.9

WORKDIR /code

 
COPY ./requirements.txt /code/requirements.txt

RUN pip install --no-cache-dir --upgrade pip setuptools && \
    pip install --no-cache-dir seqeval

RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt



RUN pip install -r requirements.txt

ENV HF_HOME=/code/transformers_cache
ENV TRANSFORMERS_CACHE=/code/transformers_cache
ENV HF_DATASETS_CACHE=/code/datasets_cache
ENV TOKENIZERS_PARALLELISM=true

VOLUME /code/transformers_cache
VOLUME /code/datasets_cache
VOLUME /code/app
VOLUME /code/models

COPY . .
RUN chmod -R 777 /code
# Install missing dependencies
RUN pip install rich
RUN pip install transformers
RUN transformers-cli download facebook/m2m100_1.2B
RUN transformers-cli download facebook/m2m100_418M

# facebook/m2m100_418M
# facebook/m2m100_1.2B




CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]