Install apex without ninja

Open
#1,665 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
build-system

Research direction

Start with setup.py, especially the BuildExtension configuration around line 771, and reproduce the reported installation command in the listed Ubuntu, Python, GCC, and CUDA environment. Compare the ninja and use_ninja=False paths and determine what causes the missing object files or compiler failure. Done means documenting or implementing a reproducible installation path without ninja.

Written by the indexing model from the issue text.

Description

bug

Describe the Bug

I try to install apex following pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./. However, it reports subprocess.CalledProcessError: Command ‘[‘ninja‘, ‘-v‘]‘ returned non-zero exit status 1. I modify "-v" with "--version", it seems missing xxx.o files. I try to install apex without ninja.

I replace BuildExtension with BuildExtension.with_options(use_ninja=False) in line 771 of the setup.py. It still reports:

error: command '/home/xxx/usr/local/gcc-7.5.0/bin/gcc' failed with exit code 1
error: subprocess-exited-with-error

Expected Behavior

I wonder how to install apex without ninja.

Environment

PyTorch version: 1.12.0+cu113
Is debug build: False
CUDA used to build PyTorch: 11.3
ROCM used to build PyTorch: N/A

OS: Ubuntu 16.04.7 LTS (x86_64)
GCC version: (GCC) 7.5.0
Clang version: Could not collect
CMake version: version 3.26.3
Libc version: glibc-2.23

Python version: 3.10.11 (main, Apr 20 2023, 19:02:41) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-4.15.0-142-generic-x86_64-with-glibc2.23
Is CUDA available: True
CUDA runtime version: 10.0.130

Dominant language
Python
Stars
9k
Forks
1.5k
Avg merge
2d 4h
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/apex

All issues in NVIDIA/apex

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.