Difference between revisions of "Infrastructure/software/pytorch"

From Nordic Language Processing Laboratory
Jump to: navigation, search
(Installation on Abel)
(Installation on Abel)
Line 11: Line 11:
 
in a Python 3.5 virtual environment.
 
in a Python 3.5 virtual environment.
  
<code>
+
<pre>
 
module purge
 
module purge
 
module load cuda/8.0
 
module load cuda/8.0
python3/3.5.0
+
module load python3/3.5.0
</code>
+
</pre>
  
<code>
+
<pre>
 
cd /projects/nlpl/software
 
cd /projects/nlpl/software
 
mkdir pytorch
 
mkdir pytorch
 
virtualenv pytorch/0.4.1
 
virtualenv pytorch/0.4.1
</code>
+
</pre>
  
 
Next, we need to create a module defintion, in this case
 
Next, we need to create a module defintion, in this case
 
<tt>/projects/nlpl/software/modulefiles/nlpl-pytorch/0.4.1</tt>.
 
<tt>/projects/nlpl/software/modulefiles/nlpl-pytorch/0.4.1</tt>.
 +
 +
<pre>
 +
module load nlpl-pytorch/0.4.1
 +
pip install --upgrade pip
 +
pip install --upgrade numpy pillow six
 +
pip install torch torchvision
 +
</pre>

Revision as of 13:23, 14 September 2018

Background

PyTorch is one of the widely used programming frameworks for Deep Learning; in and of itself it is not NLP-specific, but it is a critical dependency for several of the NLPL strands of activity.

Installation on Abel

The module nlpl-pytorch provides a PyTorch installation in a Python 3.5 virtual environment.

module purge
module load cuda/8.0
module load python3/3.5.0
cd /projects/nlpl/software
mkdir pytorch
virtualenv pytorch/0.4.1

Next, we need to create a module defintion, in this case /projects/nlpl/software/modulefiles/nlpl-pytorch/0.4.1.

module load nlpl-pytorch/0.4.1
pip install --upgrade pip
pip install --upgrade numpy pillow six
pip install torch torchvision