This commit is contained in:
Jakub Zaręba 2023-05-10 23:33:25 +02:00
parent 89b20aad30
commit d00ed5ee0d

View File

@ -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"]
RUN /bin/bash -c "source ~/.bashrc && mlflow run . -P epochs=10"
CMD ["python3", "predictions.py"]