# 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 USER pn ENV HOME=/home/pn \ PATH=/home/pn/.local/bin:$PATH COPY --chown=pn ./requirements.txt /code/requirements.txt RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt COPY --chown=pn . . COPY ./src ./src USER root RUN cd src/aineid && npm install RUN cd src/aineid && npm run build USER pn RUN ls src/aineid 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"]