Skip to content

Commit

Permalink
Merge branch 'TorchDSP:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
lboegner authored Feb 20, 2024
2 parents 4a6e14a + 9a36f24 commit 8f48199
Show file tree
Hide file tree
Showing 59 changed files with 6,455 additions and 2,433 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
examples/*
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ lightning_logs/
*.jpg
*.benchmarks/
dist/
examples/*.ipynb_checkpoints/
docs/bin
26 changes: 26 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.8"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/docs-requirements.txt
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y \
build-essential \
libgl1-mesa-glx && \
rm -rf /var/lib/apt/lists/*

Expand All @@ -15,5 +16,3 @@ RUN pip3 install /build
RUN pip3 install notebook jupyterlab

WORKDIR /workspace/code

ADD examples/ /workspace/code/examples
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,36 +48,36 @@ If you'd like to generate the named datasets without messing with your current P

```
docker build -t torchsig -f Dockerfile .
docker run -u $(id -u ${USER}):$(id -g ${USER}) -v `pwd`:/workspace/code/torchsig torchsig python3 torchsig/scripts/generate_sig53.py --root=/workspace/code/torchsig/data --all=True
docker run -u $(id -u ${USER}):$(id -g ${USER}) -v `pwd`:/workspace/code/torchsig torchsig python3 torchsig/scripts/generate_sig53.py --root=/workspace/code/torchsig/examples/sig53
```

For the wideband dataset, you can do:

```
docker build -t torchsig -f Dockerfile .
docker run -u $(id -u ${USER}):$(id -g ${USER}) -v `pwd`:/workspace/code/torchsig torchsig python3 torchsig/scripts/generate_wideband_sig53.py --root=/workspace/code/torchsig/data --all=True
docker run -u $(id -u ${USER}):$(id -g ${USER}) -v `pwd`:/workspace/code/torchsig torchsig python3 torchsig/scripts/generate_wideband_sig53.py --root=/workspace/code/torchsig/examples/wideband_sig53
```

If you do not need to use Docker, you can also just generate using the regular command-line interface

```
python3 torchsig/scripts/generate_sig53.py --root=torchsig/data --all=True
python3 torchsig/scripts/generate_sig53.py --root=torchsig/examples
```

or for the wideband dataset:

```
python3 torchsig/scripts/generate_wideband_sig53.py --root=torchsig/data --all=True
python3 torchsig/scripts/generate_wideband_sig53.py --root=torchsig/examples
```

Then, be sure to point scripts looking for ```root``` to ```torchsig/data```.
Then, be sure to point scripts looking for ```root``` to ```torchsig/examples```.

## Using the Dockerfile
If you have Docker installed along with compatible GPUs and drivers, you can try:

```
docker build -t torchsig -f Dockerfile .
docker run -d --rm --network=host --shm-size=32g --gpus all --name torchsig_workspace torchsig tail -f /dev/null
docker run -d --rm --network=host --shm-size=32g --gpus all --name torchsig_workspace -v `pwd`/examples:/workspace/code/examples torchsig tail -f /dev/null
docker exec torchsig_workspace jupyter notebook --allow-root --ip=0.0.0.0 --no-browser
```

Expand Down
Loading

0 comments on commit 8f48199

Please sign in to comment.