Skip to content

sebaxtian/data-science-py

Repository files navigation

data-science-py

Docker configuration for Data Science with Python

First of all

  • Read ALL README.md file
  • Clone a project pipeline repository into the src/ directory
  • Configure the .env file, see the example.env file and save copy with name .env
  • There are two enviroment work flow:
    • Develop
    • Production

Flow Work to Develop Enviroment

  • Build Docker Image Only Once
$ ./build.sh
  • Run Docker Container
$ ./run.sh
  • Run Docker Container (ONLY ON WINDOWS see PWD_WINDOWS in example.env file)
$ ./run.sh W
  • Run Shell into Docker Container
$ ./shell.sh

Flow Work to Production Enviroment (FUTURE WORK)

  • ...
  • ...

Build Container

See example.env file
See build.sh script file
$ docker build $(for i in `cat .env | grep -v '#'`; do out+="--build-arg $i " ; done; echo $out;out="") -t sebaxtian/data-science-py:1.0.0 .

Run Container

See example.env file
See run.sh script file
$ docker run -it --name data-science-py --env-file $PWD/.env -v $PWD/src/$DIR_APP:/home/python/src -p $PORT_APP:$PORT_APP sebaxtian/data-science-py:1.0.0

Start Container

$ docker start data-science-py

See logs Container

$ docker logs data-science-py

Restart Container

$ docker restart data-science-py

Shell in Container

See shell.sh script file
$ docker exec -it data-science-py bash

Erase Container

$ docker rm data-science-py

Erase Container Image

$ docker image rm sebaxtian/data-science-py:1.0.0

Docker Commands

  • List Docker images
$ docker image ls
  • List Docker containers (running, all, all in quiet mode)
$ docker container ls
$ docker container ls --all
$ docker container ls -aq