Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
You can contribute in many ways:
Report bugs at https://github.com/samiemostafavi/pr3d/issues.
If you are reporting a bug, please include:
- Your operating system name and version.
- Any details about your local setup that might be helpful in troubleshooting.
- Detailed steps to reproduce the bug.
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it.
Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it. Those that are tagged with "first-timers-only" is suitable for those getting started in open-source software.
PR3D
could always use more documentation, whether as part of the
official docs, in docstrings, or even on the web in blog posts,
articles, and such.
The best way to send feedback is to file an issue at https://github.com/samiemostafavi/pr3d/issues.
If you are proposing a feature:
- Explain in detail how it would work.
- Keep the scope as narrow as possible, to make it easier to implement.
- Remember that this is a volunteer-driven project, and that contributions are welcome :)
Ready to contribute? Here's how to set up pr3d
for local development.
-
Fork the
pr3d
repo on GitHub. -
Clone your fork locally:
$ git clone git@github.com:your_name_here/pr3d.git
-
Install your local copy into a virtualenv. Assuming you have virtualenv installed, this is how you set up your fork for local development:
$ cd pr3d/ $ python -m virtualenv --python=python3.9.0 ./venv $ pip install -e ".[dev]" $ pip wheel . -w wheels
-
Create a branch for local development:
$ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
-
When you're done making changes, check that your changes pass black, codespell, flake8, and isort checks. To do that, add pre-commit hooks:
$ pre-commit autoupdate $ pre-commit install $ pre-commit run --all-files
Flake8 with proper args could be set for VSCode if you use .vscode
settings.
-
Commit your changes and push your branch to GitHub:
$ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature
In brief, commit messages should follow these conventions:
- Always contain a subject line which briefly describes the changes made. For example "Update CONTRIBUTING.rst".
- Subject lines should not exceed 50 characters.
- The commit body should contain context about the change - how the code worked before, how it works now and why you decided to solve the issue in the way you did.
More detail on commit guidelines can be found at https://chris.beams.io/posts/git-commit
-
Submit a pull request through the GitHub website.
Before you submit a pull request, check that it meets these guidelines:
- The pull request should include tests.
- If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.md.
- The pull request should work for 3.9 and above. Check https://travis-ci.com/samiemostafavi/pr3d/pull_requests and make sure that the tests pass for all supported Python versions.
According to here, we need GCC 7.3.1
, CUDA 11.2
, and cuDNN 8.1
packages to enable GPU processing.
Verify the system has a cuda-capable gpu, download and install the nvidia cuda toolkit and cudnn, setup environmental variables and verify the installation.
-
If you have previous installation remove it first.
$ sudo apt-get purge nvidia* $ sudo apt remove nvidia-* $ sudo rm /etc/apt/sources.list.d/cuda* $ sudo apt-get autoremove && sudo apt-get autoclean $ sudo rm -rf /usr/local/cuda*
-
System update
$ sudo apt-get update $ sudo apt-get upgrade
-
Install dependencies
$ sudo apt-get install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev
-
Get the PPA repository driver
$ sudo add-apt-repository ppa:graphics-drivers/ppa $ sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub $ echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" | sudo tee /etc/apt/sources.list.d/cuda.list $ sudo apt-get update
-
Install CUDA-11.2
$ sudo apt-get -o Dpkg::Options::="--force-overwrite" install cuda-11-2 cuda-drivers
-
Setup your paths
$ echo 'export PATH=/usr/local/cuda-11.2/bin:$PATH' >> ~/.bashrc $ echo 'export LD_LIBRARY_PATH=/usr/local/cuda-11.2/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc $ source ~/.bashrc $ sudo ldconfig
-
Install cuDNN v8.1: to do that, you must create an account in https://developer.nvidia.com/rdp/cudnn-archive and download
cudnn-11.2-linux-x64-v8.1.1.33.tgz
. Unzip it$ tar -xzvf ~/Downloads/cudnn-11.2-linux-x64-v8.1.1.33.tgz
-
Copy the following files into the cuda toolkit directory.
$ sudo cp -P cuda/include/cudnn*.h /usr/local/cuda-11.2/include $ sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda-11.2/lib64/ $ sudo chmod a+r /usr/local/cuda-11.2/lib64/libcudnn*
-
Finally, to verify the installation, check
$ nvidia-smi $ nvcc -V
-
Install Tensorflow and verify GPU capabalities
$ pip install tensorflow==2.8.0 $ pip install protobuf==3.20.* $ python -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))" $ python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"