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.

57 lines
2.3 KiB

3 years ago
3 years ago
3 years ago
1 year ago
3 years ago
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. # full list is here: https://www.tensorflow.org/install/source#gpu .. who knows when one of them will be
  6. # down at some point
  7. # from the cmmand docker run --runtime=nvidia --rm nvidia/cuda:9.0-base nvidia-smi
  8. # you get your installed cuda version running
  9. RUN useradd -ms /bin/bash pluritonian
  10. # docker copy commands are not longer needed, as everything is
  11. # organized in an overlay on the host system.. creates problems
  12. # with windows, but with docker copy it would create problems
  13. # with the formatting too..
  14. #COPY Translations.txt /home/pluritonian/Translations.txt
  15. #COPY test_runwithgen.py /home/pluritonian/test_runwithgen.py
  16. #COPY test_runwithload.py /home/pluritonian/test_runwithload.py
  17. #COPY generateModels.py /home/pluritonian/generateModels.py
  18. #COPY req.js /home/pluritonian/req.js
  19. #COPY postcommand /home/pluritonian/postcommand
  20. #COPY EndDokumente /home/pluritonian/EndDokumente
  21. #COPY german.model.big /home/pluritonian/german.model.big
  22. #COPY updateDatabase.py /home/pluritonian/updateDatabase.py
  23. #COPY txtFilesInDir2PythonListInTxtFile.py /home/pluritonian/txtFilesInDir2PythonListInTxtFile.py
  24. #COPY pythonlistInTxtFile2NoStopwords.py /home/pluritonian/pythonlistInTxtFile2NoStopwords.py
  25. #COPY pythonlistInTxtFile2lowercase.py /home/pluritonian/pythonlistInTxtFile2lowercase.py
  26. #COPY pythonlistInTxtFile2wordClouds.py /home/pluritonian/pythonlistInTxtFile2wordClouds.py
  27. #COPY FASTsearch.py /home/pluritonian/FASTsearch.py
  28. #COPY fastapi_server.py /home/pluritonian/fastapi_server.py
  29. #USER pluritonian
  30. WORKDIR /home/pluritonian
  31. RUN apt-get update && apt-get install nano
  32. RUN pip install joblib scikit-learn hickle==3.4.9 fastapi uvicorn[standard]
  33. RUN pip install idna==2.9 python-multipart==0.0.5
  34. RUN pip install nltk gensim
  35. RUN python generateModels.py
  36. # to let the container running:
  37. CMD uvicorn --host 0.0.0.0 fastapi_server:app
  38. # these commands are useful, if you want to try out individual steps and keep the container running to
  39. # try out stuff in it by executing interactive shell in the container
  40. #ENTRYPOINT ["tail"]
  41. #CMD ["-f","/dev/null"]