-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
06b3995
commit 8bd7a91
Showing
3 changed files
with
70 additions
and
10 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
# | ||
# To build the kernel: ./kernels/lit.sh | ||
# To remove the kernel: ./kernels/lit.sh remove | ||
# | ||
# This scripts will create a ipython kernel named $ENVNAME | ||
|
||
ENVNAME=lit_kernel | ||
KERNEL_DISPLAY_NAME="LIT kernel" | ||
|
||
source ~/.bashrc | ||
|
||
# Cleaning up the kernel and exiting if first arg is 'remove' | ||
if [ "$1" == "remove" ]; then | ||
echo Removing kernel $ENVNAME | ||
jupyter kernelspec remove $ENVNAME | ||
conda env remove -n $ENVNAME -y | ||
exit 0 | ||
fi | ||
|
||
conda create -n $ENVNAME python=3.10.14 -y | ||
conda activate $ENVNAME | ||
|
||
# Install packages using a pip local to the conda environment. | ||
conda install pip | ||
pip install ipykernel | ||
# Adds the conda kernel. | ||
DL_ANACONDA_ENV_HOME="${DL_ANACONDA_HOME}/envs/$ENVNAME" | ||
python -m ipykernel install --prefix "${DL_ANACONDA_ENV_HOME}" --name $ENVNAME --display-name "$KERNEL_DISPLAY_NAME" | ||
|
||
pip install tensorflow==2.14.1 lit-nlp keras_nlp | ||
|
||
conda deactivate |
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