use problem decomposition : i want to install pytorch3d from source in my ubuntu arm cpu only : 
Skip to content
Navigation Menu

    Pricing

Sign in
Sign up
facebookresearch /
pytorch3d
Public

Code
Issues 247
Pull requests 27
Discussions
Actions
Projects
Security

    Insights

Install pytorch3d in aarch64/arm Linux architecture #1818
Closed
Sar-thak-3 opened this issue Jun 17, 2024 · 4 comments
Comments
@Sar-thak-3
Sar-thak-3 commented Jun 17, 2024
❓ Questions on how to use PyTorch3D

Is pytorch3d work on aarch64/arm architecture? I want to install this library for my project in this system architecture, but when I try it shows the error of

ERROR: Could not find a version that satisfies the requirement pytorch3d (from versions: none)
ERROR: No matching distribution found for pytorch3d

@bottler
Contributor
bottler commented Jun 17, 2024

It may work to build from source. There are no binaries provided, hence the error. And I guess it will be CPU-only.
@bottler bottler closed this as completed Jun 17, 2024
@Sar-thak-3
Author
Sar-thak-3 commented Jun 19, 2024

Hi @bottler , I tried setting up repo from source with these commands

git clone https://github.com/facebookresearch/pytorch3d.git
cd pytorch3d && pip install -e .

But Running setup.py develop for pytorch3d keeps running to infinite
@yaojin17
yaojin17 commented Jun 28, 2024

Same problem. Running setup.py develop for pytorch3d seems running endlessly
@Hydway
Hydway commented Jul 11, 2024 •

Hi @Sar-thak-3 @yaojin17 , I successfully compiled pytorch3d in a container on arm/v8 and run it in k8s cluster, and I think it also works on host machine. Here is the key steps FYI

FROM jupyter/tensorflow-notebook:aarch64-lab-4.0.3
RUN mkdir -p ~/Downloads
RUN cd ~/Downloads
# https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Mambaforge-24.3.0-0-Linux-aarch64.sh
COPY Mambaforge-24.3.0-0-Linux-aarch64.sh /root/conda.sh
USER root
RUN chmod +x /root/conda.sh && \
    bash /root/conda.sh -b -p /root/conda
RUN /root/conda/bin/conda init
RUN source ~/.bashrc
ENV PATH /root/conda/bin:$PATH
RUN apt install -y vim-tiny
RUN conda create -y -n pytorch3d python=3.10
RUN echo "conda activate pytorch3d" >> ~/.bashrc

RUN CONDA_OVERRIDE_CUDA="12.0" conda install --name pytorch3d --yes pytorch=2.3.1=cuda120_py310h377a36d_200 -c conda-forge -c nvidia

RUN conda install --name pytorch3d --yes -c conda-forge -c fvcore fvcore

RUN /bin/bash -c ". activate pytorch3d && \
    pip install --upgrade pip && \
    pip install \
    scikit-image \
    matplotlib \
    imageio \
    black \
    isort \
    flake8 \
    flake8-bugbear \
    flake8-comprehensions"

# download the pytorch3d v0.7.6 source code from repo
COPY pytorch3d /root/pytorch3d/
# download the torchvision 0.18.1 source code from repo
COPY vision-0.18.1/vision-0.18.1 /root/torchvision/

RUN /bin/bash -c ". activate pytorch3d && \
    pip install ninja && \
    cd /root/torchvision && \
    pip install . "

WORKDIR /root/pytorch3d
# https://developer.nvidia.com/cuda-12-0-0-download-archive
COPY cuda_12.0.0_525.60.13_linux_sbsa.run /root/cuda_12.0.0_525.60.aarch64.run

RUN sh /root/cuda_12.0.0_525.60.aarch64.run --toolkit  --silent
ENV CUDA_HOME /usr/local/cuda-12.0

RUN /bin/bash -c ". activate pytorch3d && \
    cd /root/pytorch3d && \
    FORCE_CUDA=1 pip install . "

as you can see Pytorch3d needs both arm version of torch and torchvision, and torchvision needs to be compiled manually. And ninja is also required(to speed up compilation process, as you mentioned the compilation seems infinite). When you finally compile the pytorch3d, make sure using FORCE_CUDA=1 to force compile and install the cuda version of pytorch3d. GLHF!
to join this conversation on GitHub. Already have an account? Sign in to comment
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

No branches or pull requests
4 participants
@bottler
@Hydway
@yaojin17
@Sar-thak-3
Footer
© 2024 GitHub, Inc.
Footer navigation

    Terms
    Privacy
    Security
    Status
    Docs
    Contact

Install pytorch3d in aarch64/arm Linux architecture · Issue #1818 · facebookresearch/pytorch3d · GitHub

this is the comit of install.md of the version i want to install : 
Skip to content
Navigation Menu

    Pricing

Sign in
Sign up
facebookresearch /
pytorch3d
Public

Code
Issues 247
Pull requests 27
Discussions
Actions
Projects
Security

    Insights

Commit
[pytorch3d install.md for 0.6.1

Summary: Update references to dependencies

Reviewed By: patricklabatut

Differential Revision: D33016832

fbshipit-source-id: aa41c7ccc6acd19654303bc18bfd734dc29d88a3

    main 

    v0.7.7 

    V0.7.8 

@bottler
@facebook-github-bot
bottler authored and facebook-github-bot committed Dec 13, 2021
1 parent 093999e commit 6ea6314
Showing 1 changed file with 5 additions and 5 deletions.

10 changes: 5 additions & 5 deletions 10
INSTALL.md
Original file line number       Diff line number        Diff line change
@@ -9,7 +9,7 @@ The core library is written in PyTorch. Several components have underlying imple

- Linux or macOS or Windows
- Python 3.6, 3.7, 3.8 or 3.9
- PyTorch 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0 or 1.9.1.
- PyTorch 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1 or 1.10.0.
- torchvision that matches the PyTorch installation. You can install them together as explained at pytorch.org to make sure of this.
- gcc & g++ ≥ 4.9
- [fvcore](https://github.com/facebookresearch/fvcore)
@@ -19,9 +19,9 @@ The core library is written in PyTorch. Several components have underlying imple

The runtime dependencies can be installed by running:
```
conda create -n pytorch3d python=3.8
conda create -n pytorch3d python=3.9
conda activate pytorch3d
conda install -c pytorch pytorch=1.7.1 torchvision cudatoolkit=10.2
conda install -c pytorch pytorch=1.9.1 torchvision cudatoolkit=10.2
conda install -c fvcore -c iopath -c conda-forge fvcore iopath
```

@@ -84,12 +84,12 @@ pip install pytorch3d
```

### 3. Install wheels for Linux
We have prebuilt wheels with CUDA for Linux for PyTorch 1.9.0, for each of the CUDA versions that they support,
We have prebuilt wheels with CUDA for Linux for PyTorch 1.10.0, for each of the CUDA versions that they support,
for Python 3.7, 3.8 and 3.9.
These are installed in a special way.
For example, to install for Python 3.8, PyTorch 1.9.0 and CUDA 10.2
```
pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu102_pyt190/download.html
pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu102_pyt1100/download.html
```

In general, from inside IPython, or in Google Colab or a jupyter notebook, you can install with
0 comments on commit 6ea6314
Please sign in to comment.
Footer
© 2024 GitHub, Inc.
Footer navigation

    Terms
    Privacy
    Security
    Status
    Docs
    Contact

[pytorch3d install.md for 0.6.1 · facebookresearch/pytorch3d@6ea6314 · GitHub