Integrating Docker and Anaconda!

I have created a docker compose file which is able to download and run anaconda docker image in just one second with only one command.

This docker container which is obtained after running the above command, it already contains many packages installed in it, but still there are many which are not installed and according to the use case we can install them. So, what I did is, in the docker compose file I have defined some environment variables by using them one can easily create a custom environment and install custom packages in that.

Name of the running container will be “anacondafull”,access to the running container can be obtained by running this command in another tab of the terminal/command prompt, “docker exec -i -t anacondafull bash”.

  • Write the name of the custom environment corresponding to “environment_name” in the docker compose file.
  • Run the following command in the container to create custom environment “conda create -n $environment_name”.
  • Write the name of the package corresponding to “package1” in the docker compose file.
  • Run the following command in the container to switch to the custom environment “conda activate $environment_name”.
  • Run the following command in the container to install particular package in the environment “conda install $package1”.

This is all from my side for the project, hope you all embrace my effort!

Big Data Enthusiast, have a demonstrated history of delivering large and complex projects. Interested in working in the field of AI and Data Science.