mirror of
https://github.com/30hours/blah2.git
synced 2024-11-18 12:33:58 +00:00
Devcontainer slow prog
This commit is contained in:
parent
e17c04af0a
commit
c8cc3d378a
3 changed files with 57 additions and 32 deletions
|
@ -3,39 +3,40 @@
|
|||
# ubuntu-22.04 by default
|
||||
ARG VARIANT="jammy"
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/cpp:0-${VARIANT}
|
||||
LABEL maintainer="30hours <nathan@30hours.dev>"
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
# Feel like this shouldn't be needed but it drops me in / during build
|
||||
WORKDIR /workspace
|
||||
|
||||
RUN apt-get update \
|
||||
#
|
||||
# Install dev tools and package dependencies
|
||||
&& apt-get install -y clang-tidy clang-format doxygen graphviz gfortran \
|
||||
libfftw3-dev liblapack-dev libopenblas-dev libudev-dev libusb-1.0.0-dev \
|
||||
#
|
||||
# Clean up
|
||||
&& apt-get autoremove -y \
|
||||
&& apt-get clean -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /blah2
|
||||
ADD lib lib
|
||||
RUN apt-get update && apt-get install -y software-properties-common \
|
||||
&& apt-add-repository ppa:ettusresearch/uhd \
|
||||
&& apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y \
|
||||
g++ make cmake git curl zip unzip doxygen graphviz \
|
||||
libfftw3-dev pkg-config gfortran \
|
||||
libuhd-dev=4.6.0.0-0ubuntu1~jammy1 \
|
||||
uhd-host=4.6.0.0-0ubuntu1~jammy1 \
|
||||
&& apt-get autoremove -y \
|
||||
&& apt-get clean -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install dependencies from vcpkg
|
||||
RUN vcpkg integrate install \
|
||||
&& vcpkg install catch2 \
|
||||
&& vcpkg install rapidjson \
|
||||
&& vcpkg install asio \
|
||||
&& vcpkg install cpp-httplib \
|
||||
&& vcpkg install armadillo \
|
||||
&& vcpkg install ryml
|
||||
# install dependencies from vcpkg
|
||||
RUN git clone https://github.com/microsoft/vcpkg /opt/vcpkg \
|
||||
&& /opt/vcpkg/bootstrap-vcpkg.sh
|
||||
ENV PATH="/opt/vcpkg:${PATH}" VCPKG_ROOT=/opt/vcpkg
|
||||
RUN cd /blah2/lib && vcpkg integrate install \
|
||||
&& vcpkg install --clean-after-build
|
||||
|
||||
COPY lib/sdrplay-3.0.7/SDRplay_RSP_API-Linux-3.07.1.run /workspace/
|
||||
# install SDRplay API
|
||||
RUN chmod +x /blah2/lib/sdrplay-3.14.0/SDRplay_RSP_API-Linux-3.14.0.run \
|
||||
&& /blah2/lib/sdrplay-3.14.0/SDRplay_RSP_API-Linux-3.14.0.run --tar -xvf -C /blah2/lib/sdrplay-3.14.0 \
|
||||
&& cp /blah2/lib/sdrplay-3.14.0/x86_64/libsdrplay_api.so.3.14 /usr/local/lib/libsdrplay_api.so \
|
||||
&& cp /blah2/lib/sdrplay-3.14.0/x86_64/libsdrplay_api.so.3.14 /usr/local/lib/libsdrplay_api.so.3.14 \
|
||||
&& cp /blah2/lib/sdrplay-3.14.0/inc/* /usr/local/include \
|
||||
&& chmod 644 /usr/local/lib/libsdrplay_api.so /usr/local/lib/libsdrplay_api.so.3.14 \
|
||||
&& ldconfig
|
||||
|
||||
# Install shitty sdrplay API
|
||||
RUN chmod +x /workspace/SDRplay_RSP_API-Linux-3.07.1.run \
|
||||
&& /workspace/SDRplay_RSP_API-Linux-3.07.1.run --tar -xf \
|
||||
&& cp x86_64/libsdrplay_api.so.3.07 /usr/local/lib/libsdrplay_api.so \
|
||||
&& ln -s /usr/local/lib/libsdrplay_api.so /usr/local/lib/libsdrplay_api.so.3.07 \
|
||||
&& cp inc/* /usr/local/include \
|
||||
&& chmod 644 /usr/local/lib/libsdrplay_api.so /usr/local/lib/libsdrplay_api.so.3.07 \
|
||||
&& ldconfig
|
||||
# install UHD API
|
||||
RUN uhd_images_downloader
|
||||
|
||||
|
|
|
@ -1 +1,23 @@
|
|||
# todo: write readme on using devcontainer with dev-release
|
||||
# todo: currently not working
|
||||
|
||||
## Usage
|
||||
|
||||
Install a recent `nodejs` using [nvm](https://github.com/nvm-sh/nvm).
|
||||
|
||||
```
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
|
||||
nvm install node 21.6.2
|
||||
```
|
||||
|
||||
Install the latest [devcontainer CLI](https://code.visualstudio.com/docs/devcontainers/devcontainer-cli).
|
||||
|
||||
```
|
||||
npm install -g @devcontainers/cli
|
||||
devcontainer --version
|
||||
```
|
||||
|
||||
Run the devcontainer.
|
||||
|
||||
```
|
||||
devcontainer up --workspace-folder .
|
||||
```
|
|
@ -1,5 +1,7 @@
|
|||
version: "3.2"
|
||||
|
||||
services:
|
||||
|
||||
blah2-dev:
|
||||
user: vscode
|
||||
build:
|
||||
|
|
Loading…
Reference in a new issue