Dockerfile 1009 B

12345678910111213141516171819202122232425262728293031323334
  1. FROM python:3.10-slim-bullseye
  2. RUN apt update
  3. RUN apt install -y build-essential tzdata gfortran libopenblas-dev libboost-all-dev
  4. ENV TZ=America/New_York
  5. ENV _workroot "/usr/local/scriptshifter/src"
  6. RUN addgroup --system www
  7. RUN adduser --system www
  8. RUN gpasswd -a www www
  9. WORKDIR ${_workroot}
  10. COPY entrypoint.sh uwsgi.ini wsgi.py ./
  11. COPY ext ./ext/
  12. # Github actions checkout won't sync these submodules recursively.
  13. RUN apt install -y git
  14. RUN git submodule add https://github.com/ibleaman/loshn-koydesh-pronunciation.git ext/yiddish/yiddish/submodules/loshn-koydesh-pronunciation
  15. RUN git submodule add https://github.com/ibleaman/hasidify_lexicon.git yiddish/submodules/hasidify_lexicon
  16. COPY scriptshifter ./scriptshifter/
  17. COPY requirements.txt ./
  18. RUN pip install --no-cache-dir -r requirements.txt
  19. # Remove development packages.
  20. RUN apt remove -y build-essential git
  21. RUN apt autoremove -y
  22. RUN chmod +x ./entrypoint.sh
  23. RUN chown -R www:www ${_workroot} .
  24. EXPOSE 8000
  25. ENTRYPOINT ["./entrypoint.sh"]