Skip to content
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

Feature Request: Refactoring Install Process #174

Open
Jordan-Pierce opened this issue Jan 9, 2025 · 1 comment
Open

Feature Request: Refactoring Install Process #174

Jordan-Pierce opened this issue Jan 9, 2025 · 1 comment

Comments

@Jordan-Pierce
Copy link
Contributor

Jordan-Pierce commented Jan 9, 2025

FYI, installing on MacOS throws an error at

        elif osused == 'Darwin':
            print('Trying to install gdal...')
            try:
                check_call(['brew', 'install', 'gdal'],
                        stdout=open(os.devnull, 'wb'), stderr=STDOUT)

and also

        out = subprocess.getstatusoutput(['cmake', '--version'])
        if out[0] != 0:
            if osused == 'Darwin':
                print('Trying to install cmake...')
                try:
                    check_call(['brew', 'install', 'cmake'],
                               stdout=open(os.devnull, 'wb'), stderr=STDOUT)
                except:
                    raise Exception('Impossible to install cmake through homebrew. Please install manually cmake before running '
                                    'this script.\nInstallation aborted.')

However, running the actual command from command line:

brew install gdal
brew install cmake

performs fine. Would help debugging, but I don't myself have a Mac.

@Jordan-Pierce Jordan-Pierce changed the title Installing GDAL on MacOS through install.py Bug: Installing GDAL on MacOS through install.py Jan 9, 2025
@Jordan-Pierce Jordan-Pierce changed the title Bug: Installing GDAL on MacOS through install.py Bug: Installing on MacOS through install.py Jan 9, 2025
@Jordan-Pierce
Copy link
Contributor Author

Following up on this: we have a few folks that are installing on MacOS and the following steps have made it install smoothly:

(Thank Clint)

  • install brew (if not already)
  • brew install gdal
  • brew install cmake
  • brew install libmagic
  • install miniconda, create conda environment (conda create --name taglab11 python=3.11 -y)
  • pip install torch torchvision (No CUDA, no problems, yay)
  • python TagLab/install.py

This has worked consistently three times on different laptops. I believe the calls to install brew within the install.py script is not doing as expected, and is perceived as an error.

What are your thoughts on having OS-specific installs (GDAL, brew, CUDA, sudo apt-get install, etc) outside of the install.py script, and instead just include those instructions in the readme / wiki? That way it's on the user instead of the install.py script. This would also remove the need for TagLab to specify versions of pytorch / CUDA, which is currently hard-coded and I'm assuming annoying to maintain.

That way, all OS-specific installs can be done by the user first, and then all OS-agnostic installs can be put into a pyproject.toml / setup.py script, so TagLab can be a pip install?

More than happy to make a PR for this.

@gaiapavoni @maxcorsini

@Jordan-Pierce Jordan-Pierce changed the title Bug: Installing on MacOS through install.py Feature Request: Refactoring Install Process Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant