-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/requirements_refactoring' into develop
- Loading branch information
Showing
13 changed files
with
214 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM sarusso/tensorflow:2.7.0 | ||
MAINTAINER Stefano Alberto Russo <stefano.russo@gmail.com> | ||
|
||
# Update apt cache | ||
RUN apt-get update | ||
|
||
# Install Python requirements | ||
COPY requirements.txt /tmp | ||
COPY requirements-arm.txt /tmp | ||
RUN if [ "$(uname -i)" = "aarch64" ] ; then pip3 install -r /tmp/requirements-arm.txt; else pip3 install -r /tmp/requirements.txt; fi | ||
|
||
# Install Jupyter and Sphinx for docs | ||
RUN pip3 install notebook==5.7.10 Sphinx==3.5.2 sphinx-rtd-theme==0.5.1 | ||
|
||
# Add demo notebooks | ||
RUN apt-get install git -y | ||
RUN cd /opt && git clone https://github.com/sarusso/Timeseria-notebooks && cd /opt/Timeseria-notebooks && git checkout be7c123 | ||
|
||
RUN ln -s /opt/Timeseria-notebooks/notebooks /notebooks | ||
|
||
# Copy entrypoint | ||
COPY containers/Ubuntu_20.04/entrypoint.sh / | ||
|
||
# Give right permissions | ||
RUN chmod 755 /entrypoint.sh | ||
|
||
# Set entrypoint | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
# Add code | ||
COPY ./ /opt/Timeseria | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Move to project root | ||
cd ../../ | ||
|
||
# Build Docker container | ||
echo -e "\n===============================" | ||
echo -e "| Building Docker container |" | ||
echo -e "===============================\n" | ||
|
||
if [[ "x$CACHE" == "xFalse" ]]; then | ||
echo "Building without cache." | ||
docker build --no-cache -f containers/Ubuntu_20.04/Dockerfile ./ -t timeseria | ||
else | ||
echo "Building with cache. Use CACHE=False to disable it." | ||
docker build -f containers/Ubuntu_20.04/Dockerfile ./ -t timeseria | ||
|
||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Move to project root | ||
cd ../../ | ||
|
||
# Build Docker container | ||
echo -e "\n===============================" | ||
echo -e "| Building Docker container |" | ||
echo -e "===============================\n" | ||
|
||
if [[ "x$CACHE" == "xFalse" ]]; then | ||
echo "Building without cache." | ||
docker buildx build --progress=plain --no-cache -f containers/Ubuntu_20.04/Dockerfile ./ --platform linux/amd64 -t timeseria-amd64 --load #--push | ||
docker buildx build --progress=plain --no-cache -f containers/Ubuntu_20.04/Dockerfile ./ --platform linux/arm64/v8 -t timeseria-arm64v8 --load #--push | ||
else | ||
echo "Building with cache. Use CACHE=False to disable it." | ||
docker buildx build --progress=plain -f containers/Ubuntu_20.04/Dockerfile ./ --platform linux/amd64 -t timeseria-amd64 --load #--push | ||
docker buildx build --progress=plain -f containers/Ubuntu_20.04/Dockerfile ./ --platform linux/arm64/v8 -t timeseria-arm64v8 --load #--push | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
# Exit on any error. More complex thing could be done in future | ||
# (see https://stackoverflow.com/questions/4381618/exit-a-script-on-error) | ||
set -e | ||
|
||
if [[ "x$(uname -i)" == "xaarch64" ]] ; then | ||
export LD_PRELOAD=/usr/local/lib/python3.8/dist-packages/scikit_learn.libs/libgomp-d22c30c5.so.1.0.0 | ||
fi | ||
|
||
if [[ "x$@" == "x" ]] ; then | ||
|
||
# Start Jupyter as default entrypoint | ||
echo -e "Running Jupyter" | ||
|
||
# Reduce verbosity and disable Python buffering | ||
export PYTHONWARNINGS=ignore | ||
export TF_CPP_MIN_LOG_LEVEL=3 | ||
export PYTHONUNBUFFERED=on | ||
export EXTENDED_TESTING=False | ||
export PYTHONPATH=\$PYTHONPATH:/opt/Timeseria | ||
|
||
cd /opt/Timeseria && jupyter notebook --ip=0.0.0.0 --port=8888 --allow-root --NotebookApp.token='' --NotebookApp.notebook_dir='/notebooks' | ||
|
||
else | ||
ENTRYPOINT_COMMAND=$@ | ||
echo -n "Executing Docker entrypoint command: " | ||
echo $ENTRYPOINT_COMMAND | ||
exec /bin/bash -c "$ENTRYPOINT_COMMAND" | ||
fi | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
USER="sarusso" | ||
VERSION="v0.1.3" | ||
|
||
echo "Tagging..." | ||
docker tag timeseria-amd64 docker.io/$USER/timeseria-amd64:$VERSION | ||
docker tag timeseria-arm64v8 docker.io/$USER/timeseria-arm64v8:$VERSION | ||
|
||
echo "Pushing images" | ||
docker push docker.io/$USER/timeseria-amd64:$VERSION | ||
docker push docker.io/$USER/timeseria-arm64v8:$VERSION | ||
|
||
echo "Creating manifest..." | ||
docker manifest create \ | ||
docker.io/$USER/timeseria:$VERSION \ | ||
--amend docker.io/$USER/timeseria-amd64:$VERSION \ | ||
--amend docker.io/$USER/timeseria-arm64v8:$VERSION | ||
|
||
echo "Pushing manifest" | ||
docker manifest push docker.io/$USER/timeseria:$VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Move to project root | ||
cd ../../ | ||
|
||
# Build Docker container | ||
echo -e "\n===============================" | ||
echo -e "| Running Docker container |" | ||
echo -e "===============================\n" | ||
|
||
if [[ "x$LIVE" == "xTrue" ]]; then | ||
echo "Running with live code changes" | ||
docker run -p8888:8888 -v $PWD:/opt/Timeseria -v $PWD/notebooks:/notebooks -it timeseria | ||
else | ||
echo "Running without live code changes. Use LIVE=True to enable them." | ||
docker run -p8888:8888 -it timeseria | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Keras==2.7.0 | ||
tensorflow-aarch64==2.7.0 | ||
matplotlib==3.5.0 | ||
numpy==1.21.4 | ||
scikit-learn==1.0.1 | ||
pandas==1.3.4 | ||
chardet==3.0.4 | ||
convertdate==2.3.2 | ||
lunarcalendar==0.0.9 | ||
holidays==0.11.3.1 | ||
cython==0.29.17 | ||
requests==2.26.0 | ||
h5py==3.6.0 | ||
scipy==1.7.3 | ||
|
||
# Optional | ||
#fbprophet==0.6 # Facebook's Prophet | ||
#pmdarima==1.8 # AARIMA | ||
#statsmodels==0.12.1 # ARIMA, SARIMAX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
Keras==2.1.3 | ||
tensorflow==1.15.2 | ||
matplotlib==2.1.2 | ||
numpy==1.19.5 | ||
scikit-image==0.15.0 | ||
scikit-learn==0.22 | ||
pandas==0.23.4 | ||
Keras==2.7.0 | ||
tensorflow==2.7.0 | ||
matplotlib==3.5.0 | ||
numpy==1.21.4 | ||
scikit-learn==1.0.1 | ||
pandas==1.3.4 | ||
chardet==3.0.4 | ||
convertdate==2.1.2 | ||
convertdate==2.3.2 | ||
lunarcalendar==0.0.9 | ||
holidays==0.10.3 | ||
holidays==0.11.3.1 | ||
cython==0.29.17 | ||
pystan==2.19.1.1 | ||
plotly==4.9.0 | ||
requests==2.20.0 | ||
h5py==2.10.0 | ||
requests==2.26.0 | ||
h5py==3.6.0 | ||
scipy==1.7.3 | ||
|
||
# Optional | ||
fbprophet==0.6 # Facebook's Prophet | ||
pmdarima==1.8 # AARIMA | ||
statsmodels==0.12.1 # ARIMA, SARIMAX | ||
#fbprophet==0.6 # Facebook's Prophet | ||
#pmdarima==1.8 # AARIMA | ||
#statsmodels==0.12.1 # ARIMA, SARIMAX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters