Skip to content

Instantly share code, notes, and snippets.

View mathiasj33's full-sized avatar

Mathias Jackermeier mathiasj33

View GitHub Profile
@mathiasj33
mathiasj33 / jax_pixi.md
Created October 4, 2025 13:55
Setting up Jax CPU and GPU environments in pixi

Pixi is a great tool for Python dependency management, supporting both conda and pypi out of the box. It also includes many other great features, such as tasks and multi-platform support.

Another great feature of pixi is the support for multiple environments. The following pyproject.toml shows how to setup a simple Jax project with two distinct environments (called "features" in pixi) for CPU-only or GPU support. This allows debugging code locally on a laptop without GPU support, and allows for running training on separate devices on a machine with a GPU, by specifying the -e (--environment) flag:

pixi run python train.py  # Runs on CPU by default
pixi run -e gpu python train.py  # Runs on Jax with cuda support

pyproject.toml

@mathiasj33
mathiasj33 / remote_development.md
Created May 1, 2024 14:06
SSH and remote development setup

Here are some very simple steps with which you can potentially improve your remote development workflow:

Add hosts to ssh config

If you normally connect to a server using ssh username@server.com, add the following lines to ~/.ssh/config:

Host serveralias
    HostName server.com  # can also be an IP address
    User username

Now you can connect to the server via ssh serveralias.