Translations:Python/40/fr: Difference between revisions

From Alliance Doc
Jump to navigation Jump to search
No edit summary
No edit summary
Line 6: Line 6:
|virtualenv --no-download $ENVDIR
|virtualenv --no-download $ENVDIR
|source $ENVDIR/bin/activate
|source $ENVDIR/bin/activate
|pip install --upgrade pip
|pip install --no-index tensorflow_gpu
|pip install --no-index tensorflow_gpu
|pip freeze > requirements.txt
|pip freeze > requirements.txt

Revision as of 18:03, 7 February 2019

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (Python)
}}
where the <code>requirements.txt</code> file will have been created from a test environment. For example, if you want to create an environment for [[TensorFlow]], you would do the following on a login node :
{{Commands
|module load python/3.10
|ENVDIR{{=}}/tmp/$RANDOM
|virtualenv --no-download $ENVDIR
|source $ENVDIR/bin/activate
|pip install --no-index --upgrade pip
|pip install --no-index tensorflow
|pip freeze --local > requirements.txt
|deactivate
|rm -rf $ENVDIR
}}

}} où le fichier requirements.txt aura été créé dans un environnement de test. Par exemple, pour créer un environnement pour TensorFlow, utilisez les commandes suivantes dans un nœud de connexion :

[name@server ~]$ module load python/3.6
[name@server ~]$ ENVDIR=/tmp/$RANDOM
[name@server ~]$ virtualenv --no-download $ENVDIR
[name@server ~]$ source $ENVDIR/bin/activate
[name@server ~]$ pip install --upgrade pip
[name@server ~]$ pip install --no-index tensorflow_gpu
[name@server ~]$ pip freeze > requirements.txt
[name@server ~]$ deactivate
[name@server ~]$ rm -rf $ENVDIR