Try โ€‚โ€‰HackMD

User practices: Installation and use of python packages on UPPMAX

Using python-venv

Installation

  1. Load python version
    โ€‹โ€‹โ€‹โ€‹$ module load module load python/3.7.2
    
  2. Create virtual environment in you project folder
    โ€‹โ€‹โ€‹$ python3 -m venv /proj/snicXXXX/venv_name
    
    New folder with the name venv_name will be created.
  3. Activate the virtual environment
    โ€‹โ€‹โ€‹$ source /proj/snicXXXX/venv_name/bin/activate
    
  4. Make sure you have the latest pip and setuptools
    (venv_name) pip install -U pip setuptools
  5. Install your packages
    โ€‹โ€‹โ€‹(venv_name) pip install torch==1.4.0 torchvision==0.5.0 OpenNMT-py==1.1.1 sacrebleu
    

Running the installed code

  1. Make sure you load the same module version as when you installed the packages.
    โ€‹โ€‹โ€‹โ€‹$ module load module load python/3.7.2`
    
  2. Activate the virtual environment
    โ€‹โ€‹โ€‹$ source /proj/snicXXXX/folder_name/bin/activate
    
  3. Run your code
    โ€‹โ€‹โ€‹(venv_name) run.py
    

Using Conda

Follow the short user guide at UPPMAX


Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More โ†’

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More โ†’

tags: UPPMAX, SNIC, User practices