Skip to content

add pixi installation method with example #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SCM syntax highlighting
pixi.lock linguist-language=YAML linguist-generated=true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/build
/data
/.vscode

# pixi environments
.pixi
*.egg-info
1 change: 1 addition & 0 deletions .pixi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ If you use this project for your research, please cite

## Getting Started

### From source
To build GLOMAP, first install [COLMAP](https://colmap.github.io/install.html#build-from-source)
dependencies and then build GLOMAP using the following commands:
```shell
Expand Down Expand Up @@ -54,6 +55,27 @@ Note:
./bootstrap && make -j$(nproc) && sudo make install
```

### Using Pixi
Pixi is a package management tools that allows for installing packages from conda ecosystem in a reproducible way. Learn more at [pixi.sh](https://pixi.sh/latest/)

Install pixi [here](https://pixi.sh/latest/#installation) and then run
```
pixi run build
pixi shell
```
This will build and install glomap inside of your isolated pixi enviroment (similar to a conda environment), you can check that glomap installed correctly by running

```
glomap -h
```

to run an example from pixi just do

```
pixi run example
```


## End-to-End Example

In this section, we will use datasets from [this link](https://demuc.de/colmap/datasets) as examples.
Expand Down
12 changes: 7 additions & 5 deletions cmake/FindDependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
set(CUDA_ENABLED OFF CACHE BOOL "" FORCE)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

find_package(Eigen3 3.4 REQUIRED)
Expand All @@ -7,11 +8,12 @@ find_package(Boost REQUIRED)

if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
find_package(Glog REQUIRED)
if(DEFINED glog_VERSION_MAJOR)
# Older versions of glog don't export version variables.
add_definitions("-DGLOG_VERSION_MAJOR=${glog_VERSION_MAJOR}")
add_definitions("-DGLOG_VERSION_MINOR=${glog_VERSION_MINOR}")
endif()
endif()

if(DEFINED glog_VERSION_MAJOR)
# Older versions of glog don't export version variables.
add_definitions("-DGLOG_VERSION_MAJOR=${glog_VERSION_MAJOR}")
add_definitions("-DGLOG_VERSION_MINOR=${glog_VERSION_MINOR}")
endif()

if(TESTS_ENABLED)
Expand Down
Loading