{"id":19362891,"url":"https://github.com/cartersusi/pacman_cuda","last_synced_at":"2025-04-23T13:31:40.518Z","repository":{"id":249891648,"uuid":"696456863","full_name":"cartersusi/pacman_cuda","owner":"cartersusi","description":"[AUR][Pacman] Current Cuda compatibility with Tensorflow and Torch on Arch Linux","archived":false,"fork":false,"pushed_at":"2024-10-27T14:56:23.000Z","size":2258,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-27T16:56:48.025Z","etag":null,"topics":["arch","arch-linux","archlinux","aur","compatibility","cuda","guide","installer","linux","pacman","script","tensorflow","torch"],"latest_commit_sha":null,"homepage":"","language":"Go","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/cartersusi.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":"2023-09-25T19:27:52.000Z","updated_at":"2024-10-27T14:56:26.000Z","dependencies_parsed_at":"2024-07-24T01:52:04.182Z","dependency_job_id":"66e0551b-c01c-4f9d-9ba2-4951114a8f1e","html_url":"https://github.com/cartersusi/pacman_cuda","commit_stats":null,"previous_names":["carter4299/cuda_tf_torch","cartersusi/pacman_cuda"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cartersusi%2Fpacman_cuda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cartersusi%2Fpacman_cuda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cartersusi%2Fpacman_cuda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cartersusi%2Fpacman_cuda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cartersusi","download_url":"https://codeload.github.com/cartersusi/pacman_cuda/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223925787,"owners_count":17226332,"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":["arch","arch-linux","archlinux","aur","compatibility","cuda","guide","installer","linux","pacman","script","tensorflow","torch"],"created_at":"2024-11-10T07:31:21.238Z","updated_at":"2025-04-23T13:31:40.505Z","avatar_url":"https://github.com/cartersusi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cuda Installer for Tensorflow and Pytorch.\n\n## LAST UPDATED: (09/04/2024)\n* There is currently no way for both Tensorflow and Torch to use the same local cuda install and Python 3.12\n* If you would like to use the same cuda version for both, use Python 3.8-3.11\n\n## Keeping the list updated\n* Submit a pull request chaning the [packages.json](installer/src/data/packages.json)\n* Open an issue if you encounter any bugs with the script.\n\n### Changes\n**Python 3.12 support**\n- Script(Recent):\n    - Installs cuda 12.3, the only cuda version supported for Tensorflow in Python 3.12.\n    - For Torch, cuda has to be installed within the virtual environment. \n- Script(Compatible):\n    - Installs cuda 11.8, this is the last time Tensorflow and Torch shared a cuda version.\n\n---\n\n## Script\n```sh\ncurl -O https://raw.githubusercontent.com/cartersusi/pacman_cuda/main/install\nchmod +x install\n./install\n```\n\n## DIY\n\n### ❗❗❗DO NOT USE YAY OR GIT❗❗❗\n\n##### My experiences from the first 10+ times using yay and git\n- 30+ minute gcc compile times ✅\n- Linker Errors ✅\n- Auto-updates \u0026 Version Mismatches ✅\n- Nvidia doesn't like you ✅\n- They actually hate you ✅\n\n---\n\n### Current Compatability\nhttps://www.tensorflow.org/install/source#gpu \\\nhttps://pytorch.org/get-started/locally/\n\nVersion\t            | Python version\t| Compiler\t    | Build tools\t| cuDNN\t | CUDA\n| :----:            |    :----:         |        :----: |  :----:       |:----:  |:----:\ntensorflow-2.17.0\t| 3.9-3.12\t        | Clang 17.0.6\t| Bazel 6.5.0\t| 8.9\t | 12.3\ntensorflow-2.13.0\t| 3.8-3.11\t        |  Clang 16.0.0\t| Bazel 5.3.0\t| 8.6\t | 11.8\nPytorch(Stable)\t    |  3.8+             |  \t            | \t            | \t     | 11.8, 12.1\n\n---\n\nTorch typically bundles pre-compiled CUDA binaries and does not require the system Cuda install.\n```bash\n# Current:\npip install torch torchvision torchaudio\n```\n\n---\n\n1. Update and download nvidia drivers ('nvidia' and 'nvidia-dkms' are interchangeable, no need to replace your 'nvidia' package if it is already installed)\n```bash\nsudo pacman -Syu nvidia-dkms opencl-nvidia nvidia-utils nvidia-settings curl\n```\n\n2. Download and install gcc12\n```bash\ncurl -O https://archive.archlinux.org/packages/g/gcc12/gcc12-12.3.0-6-x86_64.pkg.tar.zst\ncurl -O https://archive.archlinux.org/packages/g/gcc12-libs/gcc12-libs-12.3.0-6-x86_64.pkg.tar.zst\nsudo pacman -U gcc12-12.3.0-6-x86_64.pkg.tar.zst  gcc12-libs-12.3.0-6-x86_64.pkg.tar.zst\n```\n\n3. Download and install CUDA and cuDNN\n```bash\ncurl -O https://archive.archlinux.org/packages/c/cuda/cuda-12.3.2-1-x86_64.pkg.tar.zst\ncurl -O https://archive.archlinux.org/packages/c/cudnn/cudnn-8.9.7.29-1-x86_64.pkg.tar.zst\nsudo pacman -U cuda-12.3.2-1-x86_64.pkg.tar.zst cudnn-8.9.7.29-1-x86_64.pkg.tar.zst\n```\n\n4. Update /etc/pacman.conf to exclude cuda and cudnn\n- Uncomment the line \"#IgnorePkg =\", then add cuda and cudnn\n```conf\nIgnorePkg = cuda cudnn \n```\n\n### Common Tensorflow error\n```bash\n# ERROR: libdevice not found at ./libdevice.10.bc \nexport XLA_FLAGS=--xla_gpu_cuda_data_dir=/opt/cuda\n```\n\n### Common Docker error\n```sh\nsudo nvim /etc/nvidia-container-runtime/config.toml # change no-cgroups = false, save\n\nsudo systemctl restart docker\nsudo docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi\n```\n\n\n\n### Links for Cuda 11.8\ngcc11:\n- https://archive.archlinux.org/packages/g/gcc11/gcc11-11.3.0-5-x86_64.pkg.tar.zst\n- https://archive.archlinux.org/packages/g/gcc11-libs/gcc11-libs-11.3.0-5-x86_64.pkg.tar.zst\n\ncuda:\n- https://archive.archlinux.org/packages/c/cuda/cuda-11.8.0-1-x86_64.pkg.tar.zst\n\ncudnn:\n- https://archive.archlinux.org/packages/c/cudnn/cudnn-8.6.0.163-1-x86_64.pkg.tar.zst\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcartersusi%2Fpacman_cuda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcartersusi%2Fpacman_cuda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcartersusi%2Fpacman_cuda/lists"}