{"id":18395405,"url":"https://github.com/edumucelli/build-tensorflow","last_synced_at":"2026-05-10T02:47:33.385Z","repository":{"id":76859878,"uuid":"216660813","full_name":"edumucelli/build-tensorflow","owner":"edumucelli","description":"Build Tensorflow from source using a Dockerfile","archived":false,"fork":false,"pushed_at":"2019-11-06T22:56:11.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-24T10:05:06.827Z","etag":null,"topics":["cuda","cudnn","docker","tensorflow"],"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/edumucelli.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-10-21T20:36:40.000Z","updated_at":"2019-10-24T21:20:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8bab214-22d7-4c7c-ab37-ec8953e849b6","html_url":"https://github.com/edumucelli/build-tensorflow","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"ad0c0081e8e0f1934182f3906a8c1ff4f2768cd9"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edumucelli%2Fbuild-tensorflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edumucelli%2Fbuild-tensorflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edumucelli%2Fbuild-tensorflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edumucelli%2Fbuild-tensorflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edumucelli","download_url":"https://codeload.github.com/edumucelli/build-tensorflow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239078281,"owners_count":19577802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cuda","cudnn","docker","tensorflow"],"created_at":"2024-11-06T02:10:52.487Z","updated_at":"2026-05-10T02:47:28.329Z","avatar_url":"https://github.com/edumucelli.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Build Tensorflow from source\n\n(You may want to see the already built [releases](https://github.com/edumucelli/build-tensorflow/releases) before building yourself)\n\nThis project aims to build the Tensorflow from the source using a Dockerfile.\nThe idea is to simplify the build so that one can choose the the Cuda/CuDNN\nversion which better fits ones environment.\n\nAs Tensorflow pre-built binaries require specific Cuda/CuDnn versions\nup to the patch version, e.g., [#15656](https://github.com/tensorflow/tensorflow/issues/15656) you will\nstruggle if you have Cuda 9.1/2, as pre-built binaries won't work as they\nrequire cuda 9.0.\n\nThe default configuration of the Dockerfile will build:\n\n* Python 3.5\n* Tensorflow 1.7\n* Cuda 9.1.85\n* CuDNN 7.1.3\n\nAs it downloads the packages straight from Nvidia you can build the one\nyou prefer with Cuda, the package comes straight from [here](https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64).\nThe following versions are then available, just replace the `CUDA_VERSION`\nvariable by one of the following:\n\n* 8.0.44\n* 8.0.61\n* 9.0.176\n* 9.1.85\n* 9.2.88\n* 9.2.148\n* 10.0.130\n* 10.1.105\n* 10.1.168\n* 10.1.243\n\nLikewise, CuDNN version can be one of the following. Just replace the `CUDNN_PKG_VERSION`\nvariable to the one you prefer. The packages come directly from [here](https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64).\n\n* 7.0.1.13-1+cuda8.0\n* 7.0.2.38-1+cuda8.0\n* 7.0.3.11-1+cuda8.0\n* 7.0.3.11-1+cuda9.0\n* 7.0.4.31-1+cuda8.0\n* 7.0.4.31-1+cuda9.0\n* 7.0.5.15-1+cuda8.0\n* 7.0.5.15-1+cuda9.0\n* 7.0.5.15-1+cuda9.1\n* 7.1.1.5-1+cuda8.0\n* 7.1.1.5-1+cuda9.0\n* 7.1.1.5-1+cuda9.1\n* 7.1.2.21-1+cuda8.0\n* 7.1.2.21-1+cuda9.0\n* 7.1.2.21-1+cuda9.1\n* 7.1.3.16-1+cuda8.0\n* 7.1.3.16-1+cuda9.0\n* 7.1.3.16-1+cuda9.1\n* 7.1.4.18-1+cuda8.0\n* 7.1.4.18-1+cuda9.0\n* 7.1.4.18-1+cuda9.2\n* 7.2.1.38-1+cuda8.0\n* 7.2.1.38-1+cuda9.0\n* 7.2.1.38-1+cuda9.2\n* 7.3.0.29-1+cuda9.0\n* 7.3.0.29-1+cuda10.0\n* 7.3.1.20-1+cuda9.0\n* 7.3.1.20-1+cuda9.2\n* 7.3.1.20-1+cuda10.0\n* 7.4.1.5-1+cuda9.0\n* 7.4.1.5-1+cuda9.2\n* 7.4.1.5-1+cuda10.0\n* 7.4.2.24-1+cuda9.0\n* 7.4.2.24-1+cuda9.2\n* 7.4.2.24-1+cuda10.0\n* 7.5.0.56-1+cuda9.0\n* 7.5.0.56-1+cuda9.2\n* 7.5.0.56-1+cuda10.0\n* 7.5.0.56-1+cuda10.1\n* 7.5.1.10-1+cuda9.0\n* 7.5.1.10-1+cuda9.2\n* 7.5.1.10-1+cuda10.0\n* 7.5.1.10-1+cuda10.1\n* 7.6.0.64-1+cuda9.0\n* 7.6.0.64-1+cuda9.2\n* 7.6.0.64-1+cuda10.0\n* 7.6.0.64-1+cuda10.1\n* 7.6.1.34-1+cuda9.0\n* 7.6.1.34-1+cuda9.2\n* 7.6.1.34-1+cuda10.0\n* 7.6.1.34-1+cuda10.1\n* 7.6.2.24-1+cuda9.0\n* 7.6.2.24-1+cuda9.2\n* 7.6.2.24-1+cuda10.0\n* 7.6.2.24-1+cuda10.1\n* 7.6.3.30-1+cuda9.0\n* 7.6.3.30-1+cuda9.2\n* 7.6.3.30-1+cuda10.0\n* 7.6.3.30-1+cuda10.1\n* 7.6.4.38-1+cuda9.0\n* 7.6.4.38-1+cuda9.2\n* 7.6.4.38-1+cuda10.0\n* 7.6.4.38-1+cuda10.1\n\nOne thing to note is that some of the packages will respect the Cuda version\nyou are looking for, e.g.,\n\n```\napt-get install ...\n    cuda-command-line-tools-9-1 \\\n    cuda-cublas-dev-9-1 \\\n    cuda-cudart-dev-9-1 \\\n    cuda-cufft-dev-9-1 \\\n    cuda-curand-dev-9-1 \\\n    cuda-cusolver-dev-9-1 \\\n    cuda-cusparse-dev-9-1 \\\n```\n\nhave the `9-1` in the package names, if you are building a Cuda `10.1` then\nyou should replace the `9-1` everywhere by `10-1`.\n\n## Building\n\nJust run `(sudo) docker build -t build-tensorflow .` in the same directory\nas the one where the Dockerfile is stored. The tensorflow well will be\nstored on the `/tmp/pip` directory of the container.\n\n## Getting the wheel out of the container\n\nThere are [several ways](https://stackoverflow.com/questions/22049212/copying-files-from-docker-container-to-host) to copy\ndata from container to the host machine. Here is a suggestion:\n\n`sudo docker cp CONTAINER_ID:/tmp/pip/tensorflow-1.7.1-cp35-cp35m-linux_x86_64.whl .`\n\nTo get the `CONTAINER_ID` just run `docker ps -alq` or `docker ps` then see the `CONTAINER_ID`\nrespective to the `build-tensorflow` image, or the one you -t `image tag` you gave in the\nbuilding command.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedumucelli%2Fbuild-tensorflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedumucelli%2Fbuild-tensorflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedumucelli%2Fbuild-tensorflow/lists"}