Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

442
Views
La carga de entornos conda personalizados no funciona en SageMaker

Instalé miniconda en mi instancia de EBS persistente de AWS SageMaker. Aquí está mi guión inicial:

 #!/bin/bash set -e # OVERVIEW # This script installs a custom, persistent installation of conda on the Notebook Instance's EBS volume, and ensures # that these custom environments are available as kernels in Jupyter. # # The on-start script uses the custom conda environment created in the on-create script and uses the ipykernel package # to add that as a kernel in Jupyter. # # For another example, see: # https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-add-external.html#nbi-isolated-environment sudo -u ec2-user -i <<'EOF' unset SUDO_UID WORKING_DIR=/home/ec2-user/SageMaker/ for env in $WORKING_DIR/miniconda/envs/*; do BASENAME=$(basename "$env") source "$WORKING_DIR/miniconda/bin/activate" source activate "$BASENAME" pip install ipykernel boto3 python -m ipykernel install --user --name "$BASENAME" --display-name "Custom ($BASENAME)" done # Optionally, uncomment these lines to disable SageMaker-provided Conda functionality. # echo "c.EnvironmentKernelSpecManager.use_conda_directly = False" >> /home/ec2-user/.jupyter/jupyter_notebook_config.py # rm /home/ec2-user/.condarc EOF echo "Restarting the Jupyter server.." restart jupyter-server

Lo uso para cargar mis envs personalizados. Sin embargo, cuando accedo a la interfaz de JupyterLab, incluso si veo que el kernel activado es el personalizado, la única versión de python que se ejecuta en el kernel de mi computadora portátil es /home/ec2-user/anaconda3/envs/JupyterSystemEnv/bin/python :

ingrese la descripción de la imagen aquí

También inspeccioné los registros de CloudWatch y veo este registro de error: Could not find conda environment: [custom_env] .

Pero, cuando ejecuto los comandos del script de inicio dentro de la terminal de JupyterLab, Conda logra encontrar esos envs. Entonces la pregunta es: ¿qué me estoy perdiendo?

Muchas gracias.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

El uso de !which python en una celda jupyter siempre usará el sistema python predeterminado.

Pero, si seleccionó su kernel personalizado en jupyter, el python utilizado detrás de escena es el correcto, puede verificarlo comparando:

!python --version

!/home/ec2-user/SageMaker/miniconda/envs/<YOUR_CUSTOM_ENV_NAME> --version

over 4 years ago · Santiago Trujillo Report

0

Cree una imagen de SageMaker personalizada con su kernel precargado https://docs.aws.amazon.com/sagemaker/latest/dg/studio-byoi.html

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!