User Tools

Site Tools


tutoriais:conda

This is an old revision of the document!


Como usar o conda nas brucutus

Ele não está disponível no PATH. É necessário configurá-lo para achar o conda ou usar o conda diretamente do /opt/conda/bin.

export PATH=$PATH:/opt/conda/bin

Como instalar uma versão específica do Python

# criar um diretório preferencialmente fora da $HOME (e.g. /var/tmp/foo/bar)
 
# instalar o ambiente
conda create -y -p /var/tmp/foo/bar python=3.6
 
# pode ser necessário ativar o conda no shell (e.g. bash)
# nesse caso recomendamos recarregar o .bashrc
conda init bash
 
# acessar o ambiente
conda activate /var/tmp/foo/bar
 
# sair do ambiente
conda deactivate

Tensorflow

# python=3.9
conda install tensorflow-gpu numpy=1.23.4
import tensorflow as tf
sys_details = tf.sysconfig.get_build_info()
cuda_version = sys_details["cuda_version"]
gpu = tf.config.list_physical_devices('GPU')
 
print("GPU: ")
print(gpu)
print("cuda: "+cuda_version)

Torch

# python do sistema
conda install pytorch-gpu
tutoriais/conda.1713304442.txt.gz · Last modified: 2024-04-16 18:54 by gnann

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki