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

Reduce the number of installation steps for Windows #14741

Open
awaelchli opened this issue Sep 16, 2022 · 2 comments
Open

Reduce the number of installation steps for Windows #14741

awaelchli opened this issue Sep 16, 2022 · 2 comments
Assignees
Labels
docs Documentation related

Comments

@awaelchli
Copy link
Member

awaelchli commented Sep 16, 2022

📚 Documentation

Our docs for the Windows installation currently list the following as mandatory requirements:

Requirements

  1. Python 3.8.x or later (3.8.x, 3.9.x, 3.10.x)
  2. Pip (the latest versions of Python will already have this)
  3. Git
  4. PyTorch - https://pytorch.org/get-started/locally/
  5. Setup an alias for Python: python=python3
  6. Add the root folder of Lightning to the Environment Variables to PATH
  7. Install Z shell (zsh) (This is required for Windows to install the quickstart app)

I argue that most of these are not needed, and instead introduce additional points of failure. Here are my arguments why these should be removed and what can be done instead:

Git: I suspect this was added because for one, Git is not installed by default on Windows, and two, some of our tutorials and example apps need to be cloned from GitHub. Also, our CLI to pull template apps needs Git. Otherwise, Git is not required to develop and run apps, and should not be listed as mandatory.

Proposal: In the CLI, before pulling an app template using the lightning init command, check whether Git is installed. If not, friendly error message (this may already be the case). On the installation docs page, either remove mentioning Git or mention it as optional, e.g., "Some of our tutorials require cloning code from GitHub, please make sure Git is installed (link to download page)".

PyTorch: PyTorch is not a required dependency of the app framework. I suspect someone added this here because of some tutorials we have that need it. But this should be installed only when needed, mentioned either in the tutorial or added as a dependency on the specific tutorial app. PyTorch is NOT required to develop or run apps in general.

Proposal: Remove this from the list.

Alias for Python: While it doesn't hurt doing this, it's also redundant in a virtual environment. And we strongly recommend running and developing in a virtual env, as otherwise dependency hell arises. The alias won't help alleviate these issues.

Proposal: Remove this item from the list. Instead, recommend a virtual environment and point to our guide how to set it up (just like in our non-windows guide).

Pip: Same reasoning as for the alias above.

Proposal: Remove it and make sure we point to the virtual environment user guide.

Environment variables: To a user who pip-installs the package, it is not clear what this means. I suspect this item was added at a time when the only way to install lightning was to clone the repo (before public release). This step is redundant. Also, we don't have any executables in the Lightning source path, so using the PATH variable would anyway not be the right choice here.

Proposal: Remove this. It is outdated.

Install Z shell: To recommend installing a new shell just to run our simple Python framework is controversial. It is not clear why we would want to recommend this. I suspect maybe there were some commands we list in our tutorials that are only Unix-style.

Proposal: Remove this. It is not at all required to develop and run apps. If there are Unix-specific commands in our docs, we should update these places and add a Windows equivalent.

Verification

We can make sure that with the above proposals, our installation and quick start guides can be followed smoothly on Windows. For this, we install Windows in a VM, install everything from scratch and make sure the tutorial flow works without issues.


If you enjoy Lightning, check out our other projects! ⚡

  • Metrics: Machine learning metrics for distributed, scalable PyTorch applications.

  • Lite: enables pure PyTorch users to scale their existing code on any kind of device while retaining full control over their own loops and optimization logic.

  • Flash: The fastest way to get a Lightning baseline! A collection of tasks for fast prototyping, baselining, fine-tuning, and solving problems with deep learning.

  • Bolts: Pretrained SOTA Deep Learning models, callbacks, and more for research and production with PyTorch Lightning and PyTorch.

  • Lightning Transformers: Flexible interface for high-performance research using SOTA Transformers leveraging PyTorch Lightning, Transformers, and Hydra.

cc @Borda @rohitgr7 @Felonious-Spellfire

@awaelchli awaelchli added needs triage Waiting to be triaged by maintainers docs Documentation related and removed needs triage Waiting to be triaged by maintainers labels Sep 16, 2022
@carmocca
Copy link
Member

Related internal discussion: https://linear.app/lightning-ai/issue/LAI2-10220/lightning-quickstart-app-experience-feedback

@Borda
Copy link
Member

Borda commented Oct 5, 2022

I think we were recently assuming to drop support for building docs on Windows 🦦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related
Projects
None yet
Development

No branches or pull requests

4 participants