Created
June 8, 2024 05:33
-
-
Save underwater/bcecc5a54a0d143d2293e904f31b8f22 to your computer and use it in GitHub Desktop.
create hugging face transformers virtual env / jupyter lab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Step 1: Navigate to your project directory | |
cd /path/to/your/project | |
# Step 2: Create a virtual environment named transformers-env | |
python3 -m venv transformers-env | |
# Step 3: Activate the virtual environment | |
source transformers-env/bin/activate | |
# Step 4: Install Jupyter Lab in the virtual environment | |
pip install jupyterlab | |
# Step 5: Install ipykernel to create a kernel for the virtual environment | |
pip install ipykernel | |
# Step 6: Create a kernel for the virtual environment with a display name | |
python -m ipykernel install --user --name=transformers-env --display-name "Python (transformers-env)" | |
# Step 7: Start Jupyter Lab | |
jupyter lab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment