Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 2.55 KB

vscode.md

File metadata and controls

54 lines (41 loc) · 2.55 KB

VSCode Dev Containers

We have a Dev Container provided via the assets in .devcontainer.

You can follow the tutorial where you'll basically need to:

  1. Install Docker, or compatible engine
  2. Install the Development Containers extension

Then you can go to the command palette (View -> Command Palette) and select Dev Containers: Open Workspace in Container. and select your cloned flux-sched repository root. This will build a development environment from fluxrm/testenv that are built from src/test/docker (the focal tag) with a few tweaks to add linting and dev tools.

In addition to the usual flux testenv requirements, you get:

  • bear
  • fd
  • gdb
  • ripgrep

You are free to change the base image and rebuild if you need to test on another operating system! When your container is built, when you open Terminal -> New Terminal, and you'll be in the container. The dependencies for building flux-sched are installed. Try building - it will work without a hitch!

./autogen.sh
./configure --prefix=/usr/local
make
# This will install in the container to /usr/local
sudo make install
# This will test in the container
make check

Note that the above assumes installing libraries to /usr/local. If you install elsewhere, you'll need to adjust your LD_LIBRARY_PATH or similar. IPython is provided in the container for Python development, along with other linting tools. If you ever need to rebuild, you can either restart VSCode and open in the same way (and it will give you the option) or you can do on demand in the command palette with Dev Containers: Rebuild Container (with or without cache).

Important the development container assumes you are on a system with uid 1000 and gid 1000. If this isn't the case, edit the .devcontainer/Dockerfile to be your user and group id. This will ensure changes written inside the container are owned by your user. It's recommended that you commit on your system (not inside the container) because if you need to sign your commits, the container doesn't have access and won't be able to. If you find that you accidentally muck up permissions and need to fix, you can run this from your terminal outside of VSCode:

$ sudo chown -R $USER .git/
# and then commit