-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add gitpod and devcontainer configs based on mathlib4
- Loading branch information
Showing
5 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM mcr.microsoft.com/devcontainers/base:jammy | ||
|
||
USER vscode | ||
WORKDIR /home/vscode | ||
|
||
RUN curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain none | ||
|
||
ENV PATH="/home/vscode/.elan/bin:${PATH}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "lean4-pdl dev container", | ||
|
||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
|
||
"onCreateCommand": "lake exe cache get!", | ||
|
||
"customizations": { | ||
"vscode" : { | ||
"extensions" : [ "leanprover.lean4" ] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This is the Dockerfile for `leanprovercommunity/mathlib:gitpod`. | ||
|
||
# gitpod doesn't support multiple FROM statements, (or rather, you can't copy from one to another) | ||
# so we just install everything in one go | ||
FROM ubuntu:jammy | ||
|
||
USER root | ||
|
||
RUN apt-get update && apt-get install sudo git curl git bash-completion python3 python3-requests -y && apt-get clean | ||
|
||
RUN useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod \ | ||
# passwordless sudo for users in the 'sudo' group | ||
&& sed -i.bkp -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers | ||
USER gitpod | ||
WORKDIR /home/gitpod | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
# gitpod bash prompt | ||
RUN { echo && echo "PS1='\[\033[01;32m\]\u\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\]\$(__git_ps1 \" (%s)\") $ '" ; } >> .bashrc | ||
|
||
# install elan | ||
RUN curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain none | ||
|
||
# install whichever toolchain we are currently using | ||
RUN . ~/.profile && elan toolchain install $(curl https://raw.githubusercontent.com/m4lvin/lean4-pdl/main/lean-toolchain) | ||
|
||
ENV PATH="/home/gitpod/.local/bin:/home/gitpod/.elan/bin:${PATH}" | ||
|
||
# fix the infoview when the container is used on gitpod: | ||
ENV VSCODE_API_VERSION="1.50.0" | ||
|
||
# ssh to github once to bypass the unknown fingerprint warning | ||
RUN ssh -o StrictHostKeyChecking=no github.com || true | ||
|
||
# run sudo once to suppress usage info | ||
RUN sudo echo finished |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
image: | ||
file: .docker/gitpod/Dockerfile | ||
|
||
vscode: | ||
extensions: | ||
- leanprover.lean4 | ||
|
||
tasks: | ||
- init: lake exe cache get |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# PDL in Lean 4 | ||
|
||
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/m4lvin/lean4-pdl?quickstart=1) | ||
|
||
Some day this will hopefully replace <https://github.com/m4lvin/tablean>. |