Skip to content

Commit

Permalink
deps: fix CUDA version string again
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky committed Feb 3, 2022
1 parent f7ee5e5 commit 249de05
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- `make deps`: fix CUDA detection even more
- apply `device` param as passed

### Changed
- downscale images to no more than 150 DPI for prediction (for speed)

## [0.1.1] - 2022-02-02
### Fixed
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ deps:
elif command -v nvcc &>/dev/null; then \
CUDA_VERSION=$$(nvcc --version | sed -n '/^Cuda/{s/.* release //;s/,.*//;p}'); \
elif command -v nvidia-smi &>/dev/null; then \
CUDA_VERSION=$$(nvidia-smi --version | sed -n '/CUDA Version/{s/.*CUDA Version: //;s/ .*//;p}'); \
CUDA_VERSION=$$(nvidia-smi | sed -n '/CUDA Version/{s/.*CUDA Version: //;s/ .*//;p}'); \
elif command -v pkg-config &>/dev/null; then \
CUDA_VERSION=$$(pkg-config --list-all | sed -n '/^cudart/{s/cudart-//;s/ .*//;p;q}'); \
fi && \
if test -z "$$CUDA_VERSION"; then \
echo "Cannot find CUDA runtime library, assuming CPU-only"; CUDA_VERSION=CPU; \
fi && echo "Detected CUDA version: $$CUDA_VERSION" && \
if test "$$CUDA_VERSION" = CPU; then CUDA=cpu; else CUDA=cu$${CUDA_VERSION//.}; fi && \
$(PIP) install -r requirements.txt \
if test "$$CUDA_VERSION" = CPU; then CUDA=cpu; \
else IFS=. CUDA=($$CUDA_VERSION) && CUDA=cu$${CUDA[0]}$${CUDA[1]}; \
fi && $(PIP) install -r requirements.txt \
-f "https://dl.fbaipublicfiles.com/detectron2/wheels/$$CUDA/torch1.10/index.html"

# Install Python package via pip
Expand Down

0 comments on commit 249de05

Please sign in to comment.