basabuuka-prototype-rust-dc/build/rust-proto-fastapi-server/Dockerfile

41 lines
1.2 KiB
Text
Raw Normal View History

2024-08-25 21:55:08 +02:00
FROM tensorflow/tensorflow:2.2.0-gpu
# why 2.3 ? I looked it up on stack overflow
# https://stackoverflow.com/questions/50622525/which-tensorflow-and-cuda-version-combinations-are-compatible
# here is a nice list, which tf version is compatible with which cuda
# from the cmmand docker run --runtime=nvidia --rm nvidia/cuda:9.0-base nvidia-smi
# you get your installed cuda version running
#RUN useradd -ms /bin/bash pluritonian
#USER pluritonian
WORKDIR /home/pluritonian
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
RUN apt-get update && apt-get install nano
RUN pip install joblib scikit-learn==0.20.0 hickle==3.4.9
RUN pip install idna==2.9 python-multipart==0.0.5
RUN pip install nltk==3.4.1 spacy==2.0.18 pandas==0.23.4 ipywidgets==7.5.1 beautifulsoup4==4.6.3
RUN python -m spacy download de_core_news_sm
RUN pip install --upgrade pip && pip install fastapi uvicorn[standard]
COPY Prototyp/* /home/pluritonian/
# to let the container running:
CMD uvicorn --host 0.0.0.0 fastapi_server:app
#ENTRYPOINT ["tail"]
#CMD ["-f","/dev/null"]