File size: 947 Bytes
aaffe1f
 
 
a94b00b
aaffe1f
 
7d8181f
 
 
 
 
aaffe1f
086d8ea
 
ef003ce
086d8ea
 
aaffe1f
ef003ce
 
aaffe1f
 
ef003ce
3c5b26e
a94b00b
 
 
 
 
3c5b26e
a94b00b
3c5b26e
ef9f0a7
cdb7e02
ef003ce
cdb7e02
734f662
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
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
# you will also find guides on how best to write your Dockerfile

FROM nikolaik/python-nodejs:python3.9-nodejs16

WORKDIR /code
COPY lib/libgnat-4.9.so /usr/lib
COPY lib/libgnat-4.9.so.1 /usr/lib
COPY lib/libc.so /usr/lib

RUN ldconfig

RUN useradd -m -u 1000 user
USER user

ENV HOME=/home/user \
	PATH=/home/user/.local/bin:$PATH

COPY --chown=user ./requirements.txt /code/requirements.txt

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

COPY --chown=user . .

COPY package.json yarn.lock ./
COPY ./src ./src
COPY ./public ./public
RUN yarn install
RUN yarn build

RUN ls 

RUN python -c "from cltk.data.fetch import FetchCorpus; corpus_downloader = FetchCorpus(language='lat');corpus_downloader.import_corpus('lat_models_cltk')"

RUN chmod +x bin/words

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