Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspi #199

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Raspi #199

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 7 additions & 9 deletions docker/Dockerfile-api
Expand Up @@ -4,24 +4,22 @@ FROM $BASE_IMAGE
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 && \
git python3 libpq-dev \
swig gcc python3-dev \
libpython3-stdlib && \
apt-get clean && rm -rf /var/lib/apt/lists/*

RUN apt install --reinstall libpython3-stdlib

ENV PYTHONUNBUFFERED 1
RUN mkdir -p /src
WORKDIR /src
COPY ./src/requirements.txt /src

ARG DOCKER_GIT_CREDENTIALS
RUN git config --global credential.helper store && echo "${DOCKER_GIT_CREDENTIALS}" > ~/.git-credentials
RUN python3.7 -m pip install --upgrade pip
RUN python3.7 -m pip install --no-cache-dir -r requirements.txt
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --no-cache-dir -r requirements.txt

COPY ./src /src
COPY ./gunicorn /gunicorn
Expand Down
4 changes: 2 additions & 2 deletions entrypoints/api_entrypoint.sh
Expand Up @@ -12,10 +12,10 @@ trap cleanup_demodb SIGTERM
trap cleanup_demodb SIGINT

echo "Starting Migrations"
python3.7 manage.py migrate
python3.8 manage.py migrate

echo "Creating superuser (if managed)"
python3.7 /scripts/create_superuser.py
python3.8 /scripts/create_superuser.py

echo "Starting Gunicorn"
exec gunicorn sensor.wsgi -c ../gunicorn/config.py &
Expand Down
2 changes: 1 addition & 1 deletion env.template
Expand Up @@ -56,7 +56,7 @@ CALLBACK_SSL_VERIFICATION=true
MANAGER_FQDN="$(hostname -f)"
MANAGER_IP="$(hostname -I | cut -d' ' -f1)"

BASE_IMAGE=smsntia/uhd_b2xx_py3
BASE_IMAGE=ghcr.io/ntia/uhd_b2xx_py3:latest
# Default callback api/results
# Set to OAUTH if using OAuth Password Flow Authentication, callback url needs to be api/v2/results
CALLBACK_AUTHENTICATION=TOKEN
Expand Down
4 changes: 2 additions & 2 deletions src/capabilities/__init__.py
Expand Up @@ -42,6 +42,6 @@ def get_capabilities():
location = get_sigmf_location()
if location:
capabilities["sensor"]["location"] = location
else:
del capabilities["sensor"]["location"]
#else:
# del capabilities["sensor"]["location"]
return capabilities