Skip to content

Commit eeb4db7

Browse files
committed
numerical linear algebra - WIP
1 parent 73d25b7 commit eeb4db7

File tree

7 files changed

+88
-0
lines changed

7 files changed

+88
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
19+
# [Optional] Set the default user. Omit if you want to keep the default as root.
20+
USER $USERNAME
21+
SHELL ["/bin/bash", "-ec"]
22+
ENTRYPOINT ["bash"]
23+
24+
25+
# Prepare clojure tools
26+
RUN clojure -Ttools list && \
27+
clojure -Ttools install io.github.seancorfield/clj-new '{:git/tag "v1.2.404" :git/sha "d4a6508"}' :as clj-new && \
28+
clojure -Ttools install-latest :lib io.github.seancorfield/deps-new :as new && \
29+
clojure -Ttools list
30+
31+
RUN sudo apt-get update && \
32+
sudo apt-get install -y lsb-release
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
"ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {}
17+
},
18+
"customizations": {
19+
"vscode": {
20+
"extensions": [
21+
"betterthantomorrow.calva"
22+
]
23+
}
24+
}
25+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{:remote-repo {:git-url "https://github.com/scicloj/clojure-data-tutorials"
2+
:branch "main"}
3+
:base-target-path "temp"}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{:deps {org.scicloj/noj {:mvn/version "2-beta3"}
2+
com.phronemophobic/clj-media {:mvn/version "2.3"}}
3+
:paths ["src" "notebooks"]}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
(load-string (slurp "https://raw.githubusercontent.com/scicloj/clojure-data-tutorials/main/header.edn"))
2+
3+
^:kindly/hide-code
4+
(ns index)
5+
6+
;; # Preface
7+
8+
;; This is a Clojure port of parts of the Fast.ai Numerical Linear Algebra
9+
;; v2 course.
10+
;; [fastai](https://github.com/fastai)/[numerical-linear-algebra-v2](https://github.com/fastai/numerical-linear-algebra-v2)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Video_003.mp4 was downloaded from
2+
https://nbviewer.org/github/fastai/numerical-linear-algebra-v2/blob/master/nbs/02-Background-Removal-with-SVD.ipynb
3+
on 2024-12-24.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
(ns render
2+
(:require [scicloj.clay.v2.api :as clay]))
3+
4+
(clay/make! {:format [:quarto :html]
5+
:show false
6+
:base-source-path "notebooks"
7+
:source-path ["index.clj"
8+
"svd.clj"]
9+
:base-target-path "docs"
10+
:book {:title "Numerical Linear Algebra"}
11+
:clean-up-target-dir true})
12+
(System/exit 0)

0 commit comments

Comments
 (0)