# 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"]