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

Enhanced Installation Section in README.md #35094

Merged
merged 45 commits into from
Jan 14, 2025

Conversation

egojoseph
Copy link
Contributor

This PR improves the Installation section in the README.md file by:

  • Adding GPU setup instructions for TensorFlow and PyTorch.
  • Including troubleshooting tips for Python version issues and missing dependencies.
  • Separating OS-specific virtual environment activation commands for clarity.
  • Providing links to relevant installation guides for backend frameworks.

These enhancements aim to improve the clarity and usability of the installation instructions for new users.

@Rocketknight1
Copy link
Member

cc @stevhliu!

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@egojoseph
Copy link
Contributor Author

Hi @Rocketknight1 and @stevhliu, I noticed that this pull request requires workflow approval and a review to proceed. All checks have passed so far and I have updated the branch to sync with main. Could you kindly review and approve the workflows when convenient? Let me know if further changes are required. Thanks!"

@LysandreJik
Copy link
Member

We want the README.md to stay quite minimal, but those changes could be applied in the installation section in the docs!

Updated installation.md to include virtual environment and GPU setup instructions.
Updated installation.md to include virtual environment and GPU setup instructions.
Updated installation.md to include virtual environment, troubleshooting and GPU setup instructions.
Updated installation.md to include virtual environment, troubleshooting functions and GPU setup instructions.
Updated installation.md to include virtual environment, troubleshooting functions and GPU setup instructions.
Updated installation.md to include virtual environment, troubleshooting functions and GPU setup instructions.
@egojoseph
Copy link
Contributor Author

Hi @LysandreJik, @Rocketknight1, @stevhliu and team,

Thank you for the earlier feedback. Based on your suggestion, I have migrated the detailed installation instructions from the README.md file to the installation.md section under docs/en.

**Summary of Changes: **
Virtual Environment Setup Instructions:

Steps for creating and activating virtual environments across macOS, Linux and Windows, with additional guidance for potential Windows-specific issues.

**GPU Setup Section: **
Optional instructions for GPU acceleration, including compatibility resources for PyTorch and TensorFlow, along with a command to verify GPU availability.

**Troubleshooting Guide: **
Addressing common installation issues like unsupported Python versions and missing dependencies.
I believe these updates provide clear and practical guidance for users while adhering to the minimalistic approach in the README.md file as suggested. Looking forward to your feedback and approval.

Best regards,
@egojoseph

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestions!

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Comment on lines 37 to 49
### Create and Activate a Virtual Environment

Activate the virtual environment. On Linux and MacOs:
To avoid dependency conflicts, it’s recommended to use a virtual environment.

```bash
source .env/bin/activate
#### For macOS/Linux:
```
Activate Virtual environment on Windows

```bash
.env/Scripts/activate
python3 -m venv env
source env/bin/activate
```
#### For window OS:
```
python -m venv env
.\env\Scripts\activate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this section really adds anything new, so I think it can also be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @stevhliu,
I have removed the "Create and Activate a Virtual Environment" section as suggested. I understand the concern about redundancy. Would it be helpful to refine this section to emphasize the benefits of virtual environments and include troubleshooting tips? Let me know your thoughts.

docs/source/en/installation.md Outdated Show resolved Hide resolved
docs/source/en/installation.md Outdated Show resolved Hide resolved
docs/source/en/installation.md Outdated Show resolved Hide resolved
Removed numbering from README.md.
Removed unnecessary "a)" formatting as per maintainer feedback.
Added blank lines around code snippets for better readability.
Removed the line "b) Install a backend framework:" from README.md as per feedback.
Simplified "For Windows:" to "Windows" in README.md as per feedback as well as "For macOS/Linux:" to "macOS/Linux"
Removed unnecessary heading and retained valid code snippet.
Removed unnecessary heading "d) Optional: Install from source for the latest updates" as per feedback.
Removed "GPU Setup (Optional)" section to align with minimal design feedback.
Removed "Create and Activate a Virtual Environment" section from installation.md as per feedback.
Adjusted "Troubleshooting" to a second-level heading and added an introductory line as per feedback.
Updated troubleshooting section with simplified headings and formatted code blocks as per feedback.
Integrated GPU setup instructions into the "Install with pip" section for better content flow.
@egojoseph
Copy link
Contributor Author

Hi @stevhliu,
I have gone through all the comments and addressed each one. Thanks for your detailed feedback, it really helped improve the documentation! Let me know if there’s anything else to adjust.
@LysandreJik, @Rocketknight1 and team,

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, one more change and then we can merge! :)

README.md Outdated Show resolved Hide resolved
Removed Troubleshooting section from README.md for minimalism as per maintainer feedback.
@stevhliu stevhliu merged commit b0cdbd9 into huggingface:main Jan 14, 2025
8 checks passed
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

Successfully merging this pull request may close these issues.

5 participants