Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .dockerignore

This file was deleted.

11 changes: 0 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,3 @@ jobs:
/tmp/venv/bin/deepaneseg-train --help
/tmp/venv/bin/deepaneseg-preprocess data_dir=data
test -f data/0Work/split_pats.json

docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build (CPU PyTorch)
run: docker build -t deepaneseg:cpu --build-arg TORCH=cpu .
- name: Smoke test
run: |
docker run --rm deepaneseg:cpu python -c "import torch, deepaneseg.utils; print(torch.__version__)"
docker run --rm deepaneseg:cpu deepaneseg-train --help
24 changes: 0 additions & 24 deletions Dockerfile

This file was deleted.

15 changes: 0 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,6 @@ is activated.
Without uv, `pip install git+https://github.com/youssefassis/DeepAneSeg` installs the package and its commands
(with PyTorch's default build from PyPI).

### Docker
The image installs the same locked versions, with the GPU (default) or CPU PyTorch build:
```
docker build -t deepaneseg --build-arg GIT_COMMIT=$(git rev-parse HEAD) .
docker build -t deepaneseg:cpu --build-arg TORCH=cpu .
```
Mount the data folder and run any command; outputs are written to the mounted folder:
```
docker run --rm --gpus all --shm-size=8g -v /path/to/Data:/data deepaneseg \
deepaneseg-train data_dir=/data name=exp1
```
GPU runs need the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/) on
the host. `--shm-size` gives the data-loading workers enough shared memory, and `--user $(id -u):$(id -g)` creates
the output files with your own user.

## Data
### Layout
Each patient is a folder named `P` followed by four digits:
Expand Down
4 changes: 2 additions & 2 deletions deepaneseg/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ def seed_everything(seed):


def _git_commit():
"""Commit of the checkout the code runs from, or DEEPANESEG_GIT_COMMIT (set in the Docker image)."""
"""Commit of the checkout the code runs from ("unknown" outside a git checkout)."""
repo = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
try:
commit = subprocess.run(["git", "rev-parse", "HEAD"], cwd=repo, capture_output=True, text=True, check=True)
status = subprocess.run(["git", "status", "--porcelain"], cwd=repo, capture_output=True, text=True, check=True)
return commit.stdout.strip(), bool(status.stdout.strip())
except (OSError, subprocess.CalledProcessError):
return os.environ.get("DEEPANESEG_GIT_COMMIT", "unknown"), None
return "unknown", None


def run_info(**extra):
Expand Down
Loading