Skip to content

Commit

Permalink
Merge branch 'master' of github.com:scicloj/clojisr into addConvertOp…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
behrica committed May 27, 2024
2 parents de1d7a5 + 6cbcfe2 commit c0c7585
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 22 deletions.
28 changes: 24 additions & 4 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
FROM mcr.microsoft.com/devcontainers/java:11-bullseye
FROM clojure:temurin-21-tools-deps-1.11.3.1456-jammy

ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Create the user
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
#
# [Optional] Add sudo support. Omit if you don't need to install software after connecting.
&& apt-get update \
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME

# ********************************************************
# * Anything else you want to do like clean up goes here *
# ********************************************************

# [Optional] Set the default user. Omit if you want to keep the default as root.
USER $USERNAME
SHELL ["/bin/bash", "-ec"]
ENTRYPOINT ["bash"]

RUN bash -c "bash < <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install)"
RUN bash -c "bash < <(curl -s https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/master/install)"
RUN apt-get update && apt-get install -y rlwrap gfortran libblas-dev liblapack-dev libpng-dev libfontconfig1-dev libfreetype-dev gfortran libicu-dev cmake leiningen libxi6 libxtst6
53 changes: 35 additions & 18 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,48 @@
{
"name": "my Clojure app",
"build": {
"dockerfile": "Dockerfile"
},

},


"features": {
"ghcr.io/devcontainers-contrib/features/clojure-asdf:2": {},
"ghcr.io/rocker-org/devcontainer-features/r-apt:0": {}

"features": {

},
"forwardPorts": ["12345","7777"],
"ghcr.io/devcontainers-contrib/features/apt-get-packages:1": {
"packages": "rlwrap,r-base-dev"
},
"ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {},
"ghcr.io/rocker-org/devcontainer-features/r-apt:0": {},
"ghcr.io/rocker-org/devcontainer-features/rstudio-server": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/rocker-org/devcontainer-features/r-packages:1": {
"packages": "nloptr,Rserve,ranger,randomForest,ggthemes,ggplot2,mice,dplyr",
"additionalRepositories": "rforge= 'https://rforge.net'",
"installSystemRequirements": true
},
"ghcr.io/wxw-matt/devcontainer-features/command_runner:latest": {
"command1": "bash < <(curl -s https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/master/install)",
"command2": "bash < <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install)",
"command3": "bash -c 'wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein -O /usr/local/bin/lein && chmod +x /usr/local/bin/lein'"
}
},
"overrideFeatureInstallOrder": [
"ghcr.io/rocker-org/devcontainer-features/r-apt",
"ghcr.io/devcontainers-contrib/features/apt-get-packages",
"ghcr.io/rocker-org/devcontainer-features/r-packages"
],
"forwardPorts": [12345],
"portsAttributes": {
"12345": {
"label": "nrepl"
}
},
"customizations": {
"vscode": {
"settings": {
},
"extensions":
[
"vscjava.vscode-java-pack",
"borkdude.clj-kondo",
"extensions": [
"betterthantomorrow.calva"
]
}
},

"remoteUser": "vscode",
"onCreateCommand": "Rscript -e 'pak::pkg_install(c(\"ranger\",\"randomForest\",\"ggthemes\",\"ggplot2\",\"mice\",\"dplyr\",\"url::https://rforge.net/Rserve/snapshot/Rserve_1.8-12.tar.gz\"))'"
"postAttachCommand":
{ "prepare": ["bash","-c", "-i", "source ./.devcontainer/setup.sh"]
}
}
3 changes: 3 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash -xe

clj -Sthreads 1 -P
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).

## unreleased

- use devcontainer setup following template


## [1.0.0]
- `require-r` creates namespace as `r.namespace`, also `namespace` as an alias
- dependencies update, TMD 7.029
Expand Down

0 comments on commit c0c7585

Please sign in to comment.