Skip to content

Commit

Permalink
Merge pull request #955 from anarkiwi/ts
Browse files Browse the repository at this point in the history
Build gamutRF image with bespoke torchsig libraries, for new augmenta…
  • Loading branch information
anarkiwi authored Nov 6, 2023
2 parents 042cf38 + a42d368 commit a3c9468
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
docker build -f Dockerfile.base . -t iqtlabs/gamutrf-base:latest
cd ..
docker build -f Dockerfile . -t iqtlabs/gamutrf:latest
docker build -f docker/Dockerfile.torchsig docker -t iqtlabs/gamutrf-torchsig:latest
docker run -t iqtlabs/gamutrf:latest gamutrf-scan --help
docker run -t iqtlabs/gamutrf:latest gamutrf-sigfinder --help
docker run -t iqtlabs/gamutrf:latest gamutrf-api --help
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,12 @@ jobs:
push: true
tags: iqtlabs/gamutrf:${{ steps.change_version.outputs.VERSION }}
if: github.repository == 'iqtlabs/gamutrf' && github.event_name == 'push'
- name: Build and push gamutrf-torchsig
uses: docker/build-push-action@v5
with:
context: docker
file: docker/Dockerfile.torchsig
platforms: linux/amd64,linux/arm64
push: true
tags: iqtlabs/gamutrf-torchsig:${{ steps.change_version.outputs.VERSION }}
if: github.repository == 'iqtlabs/gamutrf' && github.event_name == 'push'
19 changes: 19 additions & 0 deletions docker/Dockerfile.torchsig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM ubuntu:22.04 as torchsig-builder
WORKDIR /root
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends build-essential ca-certificates cmake git python3-pip python3-dev && pip install -U pip
# Cause torch CPU only to be installed, no cuda dependencies
RUN pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
RUN git clone https://github.com/TorchDSP/torchsig -b v0.4.1
WORKDIR /root/torchsig
RUN sed -i -E "s/torch==[0-9\.]+/torch/g" pyproject.toml
RUN pip install .

FROM iqtlabs/gamutrf:latest
WORKDIR /root
ENV DEBIAN_FRONTEND noninteractive
# TODO: find a better way cherrypick just Torchsig itself, without Torch et al. Torchsig transforms have dependencies on
# Torch, even though we don't need Torch for the standalone transforms we want.
COPY --from=torchsig-builder /usr/local/lib/python3.10/dist-packages /usr/local/lib/python3.10/dist-packages
RUN python3 -c "from torchsig.transforms import transforms"
RUN python3 -c "from gamutrf import grscan"

0 comments on commit a3c9468

Please sign in to comment.