Other
PyTorch
Transformers
English
wheels
python3.10
cuda
machine-learning
deep-learning
dependency-management
Run this model with HF Jobs
Run RDHub/pytorch_python_310 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/RDHub/pytorch_python_310. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/RDHub/pytorch_python_310 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use RDHub/pytorch_python_310 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RDHub/pytorch_python_310 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("RDHub/pytorch_python_310", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add comprehensive installation guide with troubleshooting
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128# PyTorch Python 3.10 Installation Guide
## π Quick Start
### Option 1: Automated Setup (Recommended)
```bash# 1. Create conda environmentconda create -n pytorch_env python=3.10conda activate pytorch_env
# 2. Download repositorygit clone https://huggingface.co/RDHub/pytorch_python_310cd pytorch_python_310
# 3. Install all packagespip install -r lib_wheel/requirements.txt --find-links lib_wheel --no-index
# 4. Set up CUDA librariesbash setup_cuda_libs.sh
# 5. Test installationpython -c "import torch; print(f'PyTorch {torch.__version__} - CUDA: {torch.cuda.is_available()}')"```
### Option 2: Manual Setup
```bash# 1. Install packagespip install -r lib_wheel/requirements.txt --find-links lib_wheel --no-index
# 2. Create CUDA library activation scriptmkdir -p $CONDA_PREFIX/etc/conda/activate.dcat > $CONDA_PREFIX/etc/conda/activate.d/pytorch_cuda_libs.sh << 'EOF'#!/bin/bashNVIDIA_LIB_PATH=$(find $CONDA_PREFIX -path "*/nvidia/*/lib" -type d 2>/dev/null | tr '\n' ':')CUSPARSELT_LIB_PATH=$(find $CONDA_PREFIX -path "*/cusparselt/lib" -type d 2>/dev/null | tr '\n' ':')export LD_LIBRARY_PATH="${NVIDIA_LIB_PATH}${CUSPARSELT_LIB_PATH}${LD_LIBRARY_PATH}"EOFchmod +x $CONDA_PREFIX/etc/conda/activate.d/pytorch_cuda_libs.sh
# 3. Reactivate environmentconda deactivate && conda activate your_env_name```
## β
What's Included
- **PyTorch 2.7.1** with CUDA 12.6 support- **Transformers 4.52.3** for HuggingFace models- **NumPy 2.0.2** (compatible with OpenCV)- **OpenCV 4.10.0** for computer vision- **80+ compatible packages** tested together- **NVIDIA CUDA libraries** (12.6.x series)
## π§ͺ Testing Your Installation
```pythonimport torchimport transformersimport numpy as npimport cv2
# Test PyTorch CUDAprint(f"PyTorch: {torch.__version__}")print(f"CUDA Available: {torch.cuda.is_available()}")if torch.cuda.is_available(): print(f"GPU: {torch.cuda.get_device_name(0)}")
# Test basic operationsx = torch.randn(100, 100).cuda()y = torch.matmul(x, x.T)print("β
GPU tensor operations working!")
# Test transformersfrom transformers import AutoTokenizertokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")print("β
Transformers working!")
print(f"NumPy: {np.__version__}")print(f"OpenCV: {cv2.__version__}")```
## π§ Troubleshooting
### Issue: "libcufile.so.0: cannot open shared object file"
**Solution:** Run the CUDA setup script:```bashbash setup_cuda_libs.shconda deactivate && conda activate your_env_name```
### Issue: "libcusparseLt.so.0: cannot open shared object file"
**Solution:** Ensure all NVIDIA packages are installed:```bashpip install --force-reinstall lib_wheel/nvidia_cusparselt_cu12-*.whlpip install --force-reinstall lib_wheel/nvidia_cufile_cu12-*.whl```
### Issue: OpenCV + NumPy compatibility errors
**Solution:** Use the exact versions provided:```bashpip install --force-reinstall lib_wheel/numpy-2.0.2-*.whlpip install --force-reinstall lib_wheel/opencv_python-4.10.0.84-*.whl```
## π System Requirements
- **OS:** Linux x86_64 (Ubuntu 22.04+ recommended)- **Python:** 3.10- **CUDA:** Compatible with 12.2+ (12.6 optimal)- **Conda:** Required for library path management- **Storage:** ~2GB for all wheels
## π― Verified Configurations
β
**Ubuntu 22.04** + Python 3.10 + CUDA 12.2 β
**Ubuntu 22.04** + Python 3.10 + CUDA 12.6 β
**RTX 4090** + CUDA 12.6 β
**Conda environments**
## π Resources
- **Repository:** https://huggingface.co/RDHub/pytorch_python_310- **PyTorch Docs:** https://pytorch.org/docs/- **CUDA Toolkit:** https://developer.nvidia.com/cuda-toolkitINSTALLATION_GUIDE.mdAdded+128