ML stack environment on docker-compose which includes: Tensorflow + Python 3.7 and other useful tools
- Python 3.7
- TensorFlow
- Jupyter Notebook
- Portainer
- Nginx as sidecar
Extra python libs are included.
Before installing this project, please, make sure you have installed docker and docker-compose
To install docker execute:
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sh get-docker.sh
$ pip install docker-compose
Clone this project into your work directory:
$ git clone "https://github.com/trydirect/tensorflow-formula.git"
Then build it with the following command:
$ cd tensorflow-formula
$ ./setup.sh
Once the docker images are built/pulled, the stack will be deployed and a Jupyter token will be printed out.
$ ./setup.sh
Creating network "user_default" with the default driver
Creating volume "user_jupyter-notebooks" with local driver
Creating volume "user_portainer-data" with local driver
Creating user_jupyter-tensorflow_1 ... done
Creating user_portainer_1 ... done
Jupyter token: e7c7bb2956c899e7cce6fbd5587108ef701c98ca5ab0ac84
- Jypter Notebook: 8888
- Portainer: 9000
- Applications are also accessible using the following endpoints:
- Jupyter Notebook - ip_address/
- Portainer - ip_address/portainer/
- Full Docker integration
- Docker Compose integration and optimization for local development
The final project structure will look like this:
.
├── README.md
├── cleanup.sh
├── setup.sh
├── start.sh
├── stop.sh
└── v01
└── dockerfiles
├── build
│ └── app
│ └── Dockerfile
├── configs
│ └── nginx
│ └── default.conf
└── docker-compose.yml
6 directories, 8 files
Name Command State Ports
--------------------------------------------------------------------------------------------------
dockerfiles_jupyter-tensorflow_1 jupyter notebook --port=88 ... Up 0.0.0.0:8888->8888/tcp
dockerfiles_nginx_1 nginx -g daemon off; Up 0.0.0.0:80->80/tcp
dockerfiles_portainer_1 /portainer Up 0.0.0.0:9000->9000/tcp
For stopping a running stack without deleting its resources - use:
$ ./stop.sh
For starting an existing stack - use:
$ ./start.sh
For removing all the containers and volumes - use:
$ ./cleanup.sh
- Fork it (https://github.com/trydirect/tensorflow-formula/fork)
- Create your feature branch (git checkout -b feature/fooBar)
- Commit your changes (git commit -am 'Add some fooBar')
- Push to the branch (git push origin feature/fooBar)
- Create a new Pull Request