Skip to content

Instantly share code, notes, and snippets.

@svpino
Last active June 23, 2023 11:34
Show Gist options
  • Save svpino/6840b088bb26975a5291eb5ca59271ff to your computer and use it in GitHub Desktop.
Save svpino/6840b088bb26975a5291eb5ca59271ff to your computer and use it in GitHub Desktop.
SageMaker Notebook Instance - Lifecycle configuration - New Conda Environment
#!/bin/bash
set -e
sudo -u ec2-user -i <<'EOF'
ENVIRONMENT=python38
VERSION=3.8
conda create -y -n "$ENVIRONMENT" python="$VERSION" tensorflow-gpu numpy opencv pandas pyyaml
conda activate "$ENVIRONMENT"
pip install ipykernel
python -m ipykernel install --name "$ENVIRONMENT" --display-name "$ENVIRONMENT" --user
conda deactivate
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment