Search on legal documents using Tensorflow and a web_actix web interface
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.3 KiB

3 years ago
  1. FROM tensorflow/tensorflow:2.3.0-gpu
  2. # why 2.3 ? I looked it up on stack overflow
  3. # https://stackoverflow.com/questions/50622525/which-tensorflow-and-cuda-version-combinations-are-compatible
  4. # here is a nice list, which tf version is compatible with which cuda
  5. # from the cmmand docker run --runtime=nvidia --rm nvidia/cuda:9.0-base nvidia-smi
  6. # you get your installed cuda version running
  7. RUN useradd -ms /bin/bash pluritonian
  8. COPY Translations.txt /home/pluritonian/Translations.txt
  9. COPY test_runwithgen.py /home/pluritonian/test_runwithgen.py
  10. COPY test_runwithload.py /home/pluritonian/test_runwithload.py
  11. COPY generateModels.py /home/pluritonian/generateModels.py
  12. COPY req.js /home/pluritonian/req.js
  13. COPY postcommand /home/pluritonian/postcommand
  14. COPY updateDatabase.py /home/pluritonian/updateDatabase.py
  15. COPY FASTsearch.py /home/pluritonian/FASTsearch.py
  16. COPY fastapi_server.py /home/pluritonian/fastapi_server.py
  17. #USER pluritonian
  18. WORKDIR /home/pluritonian
  19. RUN apt-get update && apt-get install nano
  20. RUN pip install joblib scikit-learn hickle==3.4.9 fastapi uvicorn[standard]
  21. RUN pip install idna==2.9 python-multipart==0.0.5
  22. RUN python generateModels.py
  23. # to let the container running:
  24. CMD uvicorn --host 0.0.0.0 fastapi_server:app
  25. #ENTRYPOINT ["tail"]
  26. #CMD ["-f","/dev/null"]