Skip to content

Commit

Permalink
vscode devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
snh committed May 1, 2021
1 parent 1246fa4 commit a37ec1f
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"build": { "dockerfile": "Dockerfile.dev" },
"forwardPorts": [ 5000 ],
"runArgs": [ "--hostname=radiosonde_auto_rx", "--network=host", "--privileged" ]
}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ venv
*.autosave
.scannerwork


# Custom config file
auto_rx/config/station.cfg
auto_rx/station.cfg
auto_rx/log/

auto_rx/log_power.csv
Expand Down
33 changes: 33 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM python:3.7-buster

EXPOSE 5000/tcp

# Upgrade base packages and install dependencies.
RUN case $(uname -m) in \
"armv6l") extra_packages="libatlas3-base libgfortran5" ;; \
"armv7l") extra_packages="libatlas3-base libgfortran5" ;; \
esac && \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
libatomic1 \
rng-tools \
rtl-sdr \
sox \
tini \
usbutils \
${extra_packages} && \
rm -rf /var/lib/apt/lists/*

# Copy in requirements.txt.
COPY auto_rx/requirements.txt \
/tmp/requirements.txt

# Install Python packages.
RUN pip3 --no-cache-dir install \
--extra-index-url https://www.piwheels.org/simple \
-r /tmp/requirements.txt

# Run bash.
WORKDIR /root
CMD ["/bin/bash"]

0 comments on commit a37ec1f

Please sign in to comment.