Skip to content

Commit

Permalink
Merge pull request #23 from NTIA/MultiSwitchStatus
Browse files Browse the repository at this point in the history
Upgrade to Ubuntu 20.04, python 3.8, scos-actions 4.0.1, update healthy, and register sigan to provide status.
  • Loading branch information
jhazentia authored Sep 22, 2022
2 parents 2125ce1 + d12db79 commit 0998fa4
Show file tree
Hide file tree
Showing 37 changed files with 137 additions and 414 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ repos:
rev: v2.2.0
hooks:
- id: seed-isort-config
language_version: python3.7
language_version: python3.8
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
language_version: python3.7
language_version: python3.8
- repo: https://github.com/ambv/black
rev: 22.1.0
rev: 22.6.0
hooks:
- id: black
language_version: python3.7
language_version: python3.8
# TODO markdownlint broken
# - repo: https://github.com/markdownlint/markdownlint
# rev: v0.9.0
Expand Down
18 changes: 7 additions & 11 deletions docker/Dockerfile-test
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
FROM smsntia/uhd_b2xx_py3
FROM ubuntu:20.04


RUN apt-get update -q && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -qy --no-install-recommends \
libboost-date-time1.65.1 libboost-filesystem1.65.1 \
libboost-python1.65.1 libboost-regex1.65.1 \
libboost-serialization1.65.1 libboost-system1.65.1 \
libboost-thread1.65.1 libusb-1.0-0 libpython3.7 \
libboost-program-options1.65.1 \
git python3.7 \
swig gcc python3.7-dev && \
apt-get install -qy --no-install-recommends \
git python3 python3-pip \
python3-dev python3-uhd && \
apt-get clean && rm -rf /var/lib/apt/lists/*

ENV PYTHONUNBUFFERED 1
Expand All @@ -18,7 +14,7 @@ WORKDIR /src
COPY ./ /src

ARG DOCKER_GIT_CREDENTIALS
RUN python3.7 -m pip install --upgrade pip
RUN python3.7 -m pip install --no-cache-dir -r requirements-dev.txt
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install -r requirements-dev.txt

ENTRYPOINT ["pytest"]
44 changes: 7 additions & 37 deletions docker/Dockerfile-uhd
Original file line number Diff line number Diff line change
@@ -1,45 +1,15 @@
FROM ubuntu as build
FROM ubuntu:20.04

# Everything AFTER the "v" in the GitHub tag
ARG UHD_TAG=3.13.1.0-rc1
RUN apt-get update -q && apt-get upgrade -yq

RUN apt-get update -q && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -qy --no-install-recommends \
wget libboost-all-dev libusb-1.0-0-dev python3-setuptools \
python3-pip python3-setuptools python3-numpy \
python3-mako python3-requests \
cmake build-essential ca-certificates

RUN wget https://github.com/EttusResearch/uhd/archive/v${UHD_TAG}.tar.gz \
-O uhd.tar.gz && tar -xvzf uhd.tar.gz

RUN mkdir uhd-${UHD_TAG}/host/build
WORKDIR uhd-${UHD_TAG}/host/build
RUN cmake -DENABLE_PYTHON_API=ON -DENABLE_PYTHON3=ON ../
RUN make && make test && make install
RUN python3 /usr/local/lib/uhd/utils/uhd_images_downloader.py

FROM ubuntu

# Copy just the necessities to run B2xx with python3
COPY --from=build /usr/local/lib/libuhd.so* /usr/local/lib/
COPY --from=build /usr/local/lib/uhd/ /usr/local/lib/uhd/
COPY --from=build /usr/local/lib/python3/dist-packages/uhd/ /usr/lib/python3/dist-packages/uhd/
COPY --from=build /usr/local/include/uhd.h /usr/local/include/
COPY --from=build /usr/local/include/uhd/ /usr/local/include/uhd/
COPY --from=build /usr/local/bin/uhd_* /usr/local/bin/
COPY --from=build /usr/local/share/uhd/images/usrp_b2* /usr/local/share/uhd/images/

RUN apt-get update -q && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -qy --no-install-recommends \
libboost-date-time1.65.1 libboost-filesystem1.65.1 \
libboost-python1.65.1 libboost-regex1.65.1 \
libboost-serialization1.65.1 libboost-system1.65.1 \
libboost-thread1.65.1 libboost-program-options1.65.1 \
libusb-1.0-0 libpython3.7 \
python3 python3-pip \
python3-dev python3-uhd uhd-host \
&& \
apt-get clean && rm -rf /var/lib/apt/lists/*

CMD /usr/bin/python3.7
RUN uhd_images_downloader

CMD /usr/bin/python3
51 changes: 26 additions & 25 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with python 3.7
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# pip-compile requirements-dev.in
Expand All @@ -24,14 +24,20 @@ charset-normalizer==2.0.12
# requests
click==8.1.2
# via black
defusedxml==0.7.1
# via
# -r requirements.txt
# its-preselector
distlib==0.3.4
# via virtualenv
django==3.2.12
django==3.2.15
# via
# -r requirements.txt
# scos-actions
environs==9.5.0
# via -r requirements.txt
# via
# -r requirements.txt
# scos-actions
filelock==3.6.0
# via virtualenv
identify==2.4.12
Expand All @@ -40,16 +46,9 @@ idna==3.3
# via
# -r requirements.txt
# requests
importlib-metadata==4.11.3
# via
# click
# pluggy
# pre-commit
# pytest
# virtualenv
iniconfig==1.1.1
# via pytest
its-preselector @ git+https://github.com/NTIA/Preselector@1.0.0
its-preselector @ git+https://github.com/NTIA/Preselector@2.1.0
# via
# -r requirements.txt
# scos-actions
Expand All @@ -61,15 +60,22 @@ mypy-extensions==0.4.3
# via black
nodeenv==1.6.0
# via pre-commit
numpy==1.21.5
numexpr==2.8.3
# via
# -r requirements.txt
# scos-actions
numpy==1.23.2
# via
# -r requirements.txt
# numexpr
# scipy
# scos-actions
# sigmf
packaging==21.3
# via
# -r requirements.txt
# marshmallow
# numexpr
# pytest
pathspec==0.9.0
# via black
Expand Down Expand Up @@ -104,7 +110,9 @@ pytz==2022.1
pyyaml==6.0
# via pre-commit
requests==2.27.1
# via -r requirements.txt
# via
# -r requirements.txt
# its-preselector
ruamel-yaml==0.17.21
# via
# -r requirements.txt
Expand All @@ -113,20 +121,21 @@ ruamel-yaml-clib==0.2.6
# via
# -r requirements.txt
# ruamel-yaml
scipy==1.7.3
scipy==1.9.1
# via
# -r requirements.txt
# scos-actions
scos_actions @ git+https://github.com/NTIA/scos-actions@2.0.0
scos_actions @ git+https://github.com/NTIA/scos-actions@4.0.1
# via -r requirements.txt
sigmf @ git+https://github.com/NTIA/SigMF.git@multi-recording-archive
sigmf @ git+https://github.com/NTIA/SigMF@multi-recording-archive
# via
# -r requirements.txt
# scos-actions
six==1.16.0
# via
# -r requirements.txt
# python-dateutil
# sigmf
# virtualenv
sqlparse==0.4.2
# via
Expand All @@ -138,19 +147,11 @@ tomli==2.0.1
# via
# black
# pytest
typed-ast==1.5.2
# via black
typing-extensions==4.1.1
# via
# -r requirements.txt
# asgiref
# black
# importlib-metadata
# via black
urllib3==1.26.9
# via
# -r requirements.txt
# requests
virtualenv==20.14.0
# via pre-commit
zipp==3.8.0
# via importlib-metadata
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
django>=3.1.13, <4.0
environs>=9.0, <10.0
numpy>=1.0, <2.0
scos_actions @ git+https://github.com/NTIA/scos-actions@2.0.0
scos_actions @ git+https://github.com/NTIA/scos-actions@4.0.1
29 changes: 18 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with python 3.7
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# pip-compile requirements.in
Expand All @@ -10,26 +10,35 @@ certifi==2021.10.8
# via requests
charset-normalizer==2.0.12
# via requests
django==3.2.12
defusedxml==0.7.1
# via its-preselector
django==3.2.15
# via
# -r requirements.in
# scos-actions
environs==9.5.0
# via -r requirements.in
# via
# -r requirements.in
# scos-actions
idna==3.3
# via requests
its-preselector @ git+https://github.com/NTIA/Preselector@1.0.0
its-preselector @ git+https://github.com/NTIA/Preselector@2.1.0
# via scos-actions
marshmallow==3.15.0
# via environs
numpy==1.21.5
numexpr==2.8.3
# via scos-actions
numpy==1.23.2
# via
# -r requirements.in
# numexpr
# scipy
# scos-actions
# sigmf
packaging==21.3
# via marshmallow
# via
# marshmallow
# numexpr
pyparsing==3.0.7
# via packaging
python-dateutil==2.8.2
Expand All @@ -44,19 +53,17 @@ ruamel-yaml==0.17.21
# via scos-actions
ruamel-yaml-clib==0.2.6
# via ruamel-yaml
scipy==1.7.3
scipy==1.9.1
# via scos-actions
scos_actions @ git+https://github.com/NTIA/scos-actions@2.0.0
scos_actions @ git+https://github.com/NTIA/scos-actions@4.0.1
# via -r requirements.in
sigmf @ git+https://github.com/NTIA/SigMF.git@multi-recording-archive
sigmf @ git+https://github.com/NTIA/SigMF@multi-recording-archive
# via scos-actions
six==1.16.0
# via
# python-dateutil
# sigmf
sqlparse==0.4.2
# via django
typing-extensions==4.1.1
# via asgiref
urllib3==1.26.9
# via requests
1 change: 1 addition & 0 deletions scos_usrp/configs/actions/acquire_iq_700MHz_ATT_DL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ single_frequency_time_domain_iq:
sample_rate: 15.36e6
duration_ms: 1000
nskip: 15.36e4
classification: UNCLASSIFIED
1 change: 1 addition & 0 deletions scos_usrp/configs/actions/acquire_iq_700MHz_ATT_UL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ single_frequency_time_domain_iq:
sample_rate: 15.36e6
duration_ms: 1000
nskip: 15.36e4
classification: UNCLASSIFIED
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ single_frequency_time_domain_iq:
sample_rate: 15.36e6
duration_ms: 1000
nskip: 15.36e4
classification: UNCLASSIFIED
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ single_frequency_time_domain_iq:
sample_rate: 15.36e6
duration_ms: 1000
nskip: 15.36e4
classification: UNCLASSIFIED
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ single_frequency_time_domain_iq:
sample_rate: 15.36e6
duration_ms: 10000
nskip: 15.36e4
classification: UNCLASSIFIED
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ single_frequency_time_domain_iq:
sample_rate: 15.36e6
duration_ms: 10000
nskip: 15.36e4
classification: UNCLASSIFIED
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ single_frequency_time_domain_iq:
sample_rate: 15.36e6
duration_ms: 1000
nskip: 15.36e4
classification: UNCLASSIFIED
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ single_frequency_time_domain_iq:
sample_rate: 15.36e6
duration_ms: 1000
nskip: 15.36e4
classification: UNCLASSIFIED
1 change: 1 addition & 0 deletions scos_usrp/configs/actions/acquire_iq_700MHz_Verizon_DL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ single_frequency_time_domain_iq:
sample_rate: 15.36e6
duration_ms: 1000
nskip: 15.36e4
classification: UNCLASSIFIED
1 change: 1 addition & 0 deletions scos_usrp/configs/actions/acquire_iq_700MHz_Verizon_UL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ single_frequency_time_domain_iq:
sample_rate: 15.36e6
duration_ms: 1000
nskip: 15.36e4
classification: UNCLASSIFIED
1 change: 1 addition & 0 deletions scos_usrp/configs/actions/acquire_m4s_700MHz_ATT_DL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ single_frequency_fft:
fft_size: 1024
nffts: 300
nskip: 15.36e4
classification: UNCLASSIFIED
1 change: 1 addition & 0 deletions scos_usrp/configs/actions/acquire_m4s_700MHz_ATT_UL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ single_frequency_fft:
fft_size: 1024
nffts: 300
nskip: 15.36e4
classification: UNCLASSIFIED
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ single_frequency_fft:
fft_size: 1024
nffts: 300
nskip: 15.36e4
classification: UNCLASSIFIED
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ single_frequency_fft:
fft_size: 1024
nffts: 300
nskip: 15.36e4
classification: UNCLASSIFIED
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ single_frequency_fft:
fft_size: 1024
nffts: 300
nskip: 15.36e4
classification: UNCLASSIFIED
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ single_frequency_fft:
fft_size: 1024
nffts: 300
nskip: 15.36e4
classification: UNCLASSIFIED
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ single_frequency_fft:
fft_size: 1024
nffts: 300
nskip: 15.36e4
classification: UNCLASSIFIED
Loading

0 comments on commit 0998fa4

Please sign in to comment.