Skip to content
Snippets Groups Projects
Verified Commit 35d53ba2 authored by Lars Bilke's avatar Lars Bilke
Browse files

Added VSCode devcontainer.

- Uses newer FEFLOW packages
- In VSCode use command "Reopen in container"
- Open terminal
- Run `source .venv-devcontainer/bin/activate`
- Develop as usual
parent 1987c9c2
No related branches found
No related tags found
No related merge requests found
FROM mcr.microsoft.com/devcontainers/python:3.9-bookworm
# FEFLOW, instructions from https://download.feflow.com/download/FEFLOW/linux/
ENV \
# Adapt when changing base image:
DIST_DIR=ub2204x64
RUN apt-get update \
&& apt-get install -yq --no-install-recommends gpg curl ca-certificates \
&& curl -fsSL https://download.feflow.com/download/FEFLOW/linux/dhi-feflow-key.asc | gpg --dearmor | sudo tee /usr/share/keyrings/feflow.gpg > /dev/null \
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/feflow.gpg] https://download.feflow.com/download/FEFLOW/linux/apt-repo/$DIST_DIR stable main" | sudo tee /etc/apt/sources.list.d/feflow.stable.list \
&& apt-get update \
&& apt list | grep feflow \
&& apt-get install -yq --no-install-recommends feflow-ifm-devel feflow-python80 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
ENV \
PYTHONPATH=/opt/feflow/8.0/python \
LD_LIBRARY_PATH=/opt/feflow/8.0/lib64:/opt/feflow/common/qt/lib64:/opt/feflow/common/lib64 \
FEFLOW80_ROOT=/opt/feflow/8.0
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "ogstools with FEFLOW",
// More info: https://containers.dev/guide/dockerfile
"build": {
"dockerfile": "Dockerfile"
},
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/git-lfs:1": {}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
"postCreateCommand": "make setup_devcontainer"
// Configure tool-specific properties.
// "customizations": {}
}
......@@ -126,7 +126,7 @@ celerybeat.pid
# Environments
.env
.venv
.venv*
env/
venv/
ENV/
......
......@@ -16,6 +16,16 @@ setup_headless: ## Install vtk-osmesa and gmsh without X11 dependencies
.venv/bin/pip install --extra-index-url https://wheels.vtk.org vtk-osmesa
.venv/bin/pip install -i https://gmsh.info/python-packages-dev-nox gmsh
setup_devcontainer:
python -m venv .venv-devcontainer --upgrade-deps
.venv-devcontainer/bin/pip install -e .[dev,test,docs,feflow]
.venv-devcontainer/bin/pip uninstall gmsh vtk -y
.venv-devcontainer/bin/pip install --extra-index-url https://wheels.vtk.org vtk-osmesa
.venv-devcontainer/bin/pip install -i https://gmsh.info/python-packages-dev-nox gmsh
@echo
@echo ATTENTION: You need to activate the virtual environment in every shell with:
@echo source .venv-devcontainer/bin/activate
test: ## Runs the unit tests
pytest
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment