bast / R-and-Python

Taking notes as I am learning R.
https://bast.github.io/R-and-Python/
1 stars 0 forks source link

Mention scalene somehwere #4

Open bast opened 1 year ago

bast commented 1 year ago

https://github.com/plasma-umass/scalene

bast commented 1 year ago

This is how I run it:

$ time ./container.sif scalene --outfile profile.out --reduced-profile example.py

... with this container:

Bootstrap: docker
From: debian:bullseye-slim

%post
  export DEBIAN_FRONTEND=noninteractive
  apt-get update -y
  apt install -y python3 python3-venv
  apt-get clean

  ln -sf /usr/bin/python3 /usr/bin/python

  # default sh on ubuntu is dash
  ln -sf /bin/bash /bin/sh

  mkdir /install
  python3 -m venv /install/venv
  . /install/venv/bin/activate

  python3 -m pip install --upgrade pip
  python3 -m pip install scalene

%environment
  export LC_ALL=C

%runscript
  source /install/venv/bin/activate

  $@