{"id":19431201,"url":"https://github.com/zqpei/docker_pytorch_tensorflow","last_synced_at":"2026-05-06T00:03:17.659Z","repository":{"id":109498587,"uuid":"195657404","full_name":"ZQPei/docker_pytorch_tensorflow","owner":"ZQPei","description":"This repository contains a Dockerfile for an anaconda environment with pytorch and tensorflow installed as well as oh-my-zsh, tmux and etc.","archived":false,"fork":false,"pushed_at":"2019-07-08T02:48:44.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-25T05:45:00.181Z","etag":null,"topics":["anaconda3","docker","dockerfile","oh-my-zsh","pytorch","tensorflow","tmux"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZQPei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-07T13:55:52.000Z","updated_at":"2019-12-09T09:44:21.000Z","dependencies_parsed_at":"2023-04-06T06:36:08.087Z","dependency_job_id":null,"html_url":"https://github.com/ZQPei/docker_pytorch_tensorflow","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ZQPei/docker_pytorch_tensorflow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZQPei%2Fdocker_pytorch_tensorflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZQPei%2Fdocker_pytorch_tensorflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZQPei%2Fdocker_pytorch_tensorflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZQPei%2Fdocker_pytorch_tensorflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZQPei","download_url":"https://codeload.github.com/ZQPei/docker_pytorch_tensorflow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZQPei%2Fdocker_pytorch_tensorflow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32672685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anaconda3","docker","dockerfile","oh-my-zsh","pytorch","tensorflow","tmux"],"created_at":"2024-11-10T14:28:38.584Z","updated_at":"2026-05-06T00:03:17.644Z","avatar_url":"https://github.com/ZQPei.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DAPT - Docker of anaconda with pytorch and tensorflow\n\n![](logo.png)\n\n## 1. What is this repository for ?\n\nUsually configuring the environment is a boring and painful, and it's easy to make mistakes and takes a lot of time. Docker can help solve this problem very well.  \n\nWhat is Docker? Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. In a way, Docker is a bit like a virtual machine. But unlike a virtual machine, rather than creating a whole virtual operating system, Docker allows applications to use the same Linux kernel as the system that they're running on and only requires applications be shipped with things not already running on the host computer. \n\nThis repository can help deep learning researchers configure a pytorch and tensorflow environment based on anaconda, together with oh-my-zsh and tmux, on any linux or mac machine within only a few minutes. You just need to know a few docker commands to get started.\n\n\n## 2. How to use ?\n\nSuppose you have cuda already installed, and cuda version is `cuda-9.0`, now you can go ahead with the following steps.\n\n```bash\n# download this repo\n$ git clone https://github.com/ZQPei/docker_pytorch_tensorflow.git\n$ cd docker_pytorch_tensorflow\n```\n\n### 2.1 install docker and nvidia-docker\n\n```bash\n# 1. install docker\n$ curl -fsSL get.docker.com -o get-docker.sh\n$ sudo sh get-docker.sh --mirror Aliyun\n# add user to docker group if you do not want sudo every time\n$ sudo usermod -aG docker runoob \n$ systemctl enable docker\n$ service docker start\n# check if docker is installed successfully\n$ docker run hello-world \n\n# 2. install nvidia-docker and nvidia-docker-plugin\n\n# If you have nvidia-docker 1.0 installed: we need to remove it and all existing GPU containers\n$ docker volume ls -q -f driver=nvidia-docker | xargs -r -I{} -n1 docker ps -q -a -f volume={} | xargs -r docker rm -f\n$ sudo apt-get purge -y nvidia-docker\n# Add the package repositories\n$ curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \\\n    sudo apt-key add -\n$ distribution=$(. /etc/os-release;echo $ID$VERSION_ID)\n$ curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list\n$ sudo apt-get update\n\n# Install nvidia-docker2 and reload the Docker daemon configuration\n$ sudo apt-get install -y nvidia-docker2\n$ sudo pkill -SIGHUP dockerd\n\n# Test nvidia-smi with the latest official CUDA image\n$ docker run --runtime=nvidia --rm nvidia/cuda:9.0-base nvidia-smi\n```\n\n\n### 2.2 build docker image\n\n- if you want a quick start, you can pull the image from docker hub and skip the build step\n```bash\n# pull from docker hub directly\n$ docker pull dfzspzq/anaconda_pytorch_tf:gpu\n# check\n$ docker image ls\n```\n\n- otherwise you need build your own image\n```bash\n# for instance cuda-9.0\n$ cp cuda-9.0/Dockerfile .\n$ docker build -t pytorch_tf:gpu -f Dockerfile .\n\n# it will take a while, please wait...\n\n$ docker image ls\nREPOSITORY              TAG         IMAGE ID            CREATED             SIZE\npytorch_tf              gpu         70fbd709e31e        3 minutes ago       9.76GB\nhello-world             latest      fce289e99eb9        20 minutes ago      1.84kB\n\n```\n\n\n### 2.3 start a container\n\n```bash\n# start a container\n$ docker container run -it \\\n    --name gpu_env \\\n    --runtime=nvidia -u pzq \\\n    --shm-size=16g pytorch_tf:gpu /bin/zsh\n```\n\n\n### 2.4 mount data and code to a container\n\n```bash\n# data and code should be independent with docker container by mounted to it.\n$ docker container run -it \\\n    --name gpu_env \\\n    --runtime=nvidia -u pzq \\\n    --mount type=bind,source=/path/to/data,target=/home/pzq/Desktop/data \\\n    --mount type=bind,source=/path/to/code,target=/home/pzq/Desktop/code \\\n    --shm-size=16g pytorch_tf:gpu /bin/zsh\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzqpei%2Fdocker_pytorch_tensorflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzqpei%2Fdocker_pytorch_tensorflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzqpei%2Fdocker_pytorch_tensorflow/lists"}