From d00ed5ee0dad794e54a535ba910386fd9d4aaa54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Zar=C4=99ba?= Date: Wed, 10 May 2023 23:33:25 +0200 Subject: [PATCH] s --- Dockerfile | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 36b2be5..52dbfe8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,14 @@ FROM ubuntu -RUN apt-get update && apt-get install -y python3 python3-pip unzip - -RUN python3 -m pip install pandas numpy tensorflow imbalanced-learn sklearn sacred pymongo mlflow -RUN apt-get install -y git +RUN apt-get update && apt-get install -y python3 python3-pip unzip make build-essential libssl-dev zlib1g-dev \ + libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ + xz-utils tk-dev libffi-dev liblzma-dev python-openssl git \ + && curl https://pyenv.run | bash \ + && echo 'export PATH="/root/.pyenv/bin:$PATH"' >> ~/.bashrc \ + && echo 'eval "$(pyenv init -)"' >> ~/.bashrc \ + && echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc \ + && /bin/bash -c "source ~/.bashrc" \ + && python3 -m pip install pandas numpy tensorflow imbalanced-learn sklearn sacred pymongo mlflow COPY train.py /app/train.py COPY predictions.py /app/predictions.py @@ -12,6 +17,7 @@ COPY data.csv /app/data.csv WORKDIR /app RUN export SACRED_IGNORE_GIT=TRUE -RUN mlflow run . -P epochs=10 -CMD ["python3", "predictions.py"] \ No newline at end of file +RUN /bin/bash -c "source ~/.bashrc && mlflow run . -P epochs=10" + +CMD ["python3", "predictions.py"]