Skip to content

Commit 48002df

Browse files
committed
Merge branch 'master' of github.com:techascent/tech.ml.dataset
2 parents 017e57a + 2e92596 commit 48002df

File tree

3 files changed

+83
-0
lines changed

3 files changed

+83
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
ARG BASE_IMAGE=temurin-21-tools-deps-jammy
2+
FROM clojure:${BASE_IMAGE}
3+
4+
ARG USERNAME=vscode
5+
ARG USER_UID=1000
6+
ARG USER_GID=$USER_UID
7+
8+
# Create the user
9+
RUN groupadd --gid $USER_GID $USERNAME \
10+
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
11+
#
12+
# [Optional] Add sudo support. Omit if you don't need to install software after connecting.
13+
&& apt-get update \
14+
&& apt-get install -y sudo \
15+
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
16+
&& chmod 0440 /etc/sudoers.d/$USERNAME
17+
18+
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libopenblas-dev lz4 gnupg libgomp1
19+
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BAC6F0C353D04109
20+
RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
21+
RUN echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
22+
RUN sudo apt update
23+
RUN sudo apt install -y intel-oneapi-mkl
24+
# [Optional] Set the default user. Omit if you want to keep the default as root.
25+
USER $USERNAME
26+
SHELL ["/bin/bash", "-ec"]
27+
ENTRYPOINT ["bash"]
28+
29+
30+
# Prepare clojure tools
31+
RUN clojure -Ttools list && \
32+
clojure -Ttools install io.github.seancorfield/clj-new '{:git/tag "v1.2.404" :git/sha "d4a6508"}' :as clj-new && \
33+
clojure -Ttools install-latest :lib io.github.seancorfield/deps-new :as new && \
34+
clojure -Ttools list
35+
36+
RUN sudo apt-get update && \
37+
sudo apt-get install -y lsb-release

.devcontainer/devcontainer.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/scicloj/devcontainer-templates/tree/main/src/basecloj
3+
{
4+
"name": "Base clojure dev env",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"args": {
8+
"BASE_IMAGE": "temurin-21-tools-deps-jammy",
9+
"USERNAME": "${localEnv:USER}"
10+
}
11+
},
12+
"remoteUser": "${localEnv:USER}",
13+
"containerUser": "${localEnv:USER}",
14+
"features": {
15+
"ghcr.io/devcontainers/features/git:1": {}
16+
},
17+
"customizations": {
18+
"vscode": {
19+
"extensions": [
20+
"betterthantomorrow.calva"
21+
]
22+
}
23+
}
24+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Run tests in devcontainer
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
run-tests:
11+
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: run tests
17+
uses: devcontainers/ci@v0.3
18+
with:
19+
runCmd: bash -c 'scripts/get-data.sh && scripts/run-tests'
20+
push: never
21+
22+

0 commit comments

Comments
 (0)