Skip to content

Commit 2ba9708

Browse files
committed
Cleanup remaining lean3 configuration
1 parent a4838a2 commit 2ba9708

File tree

3 files changed

+41
-11
lines changed

3 files changed

+41
-11
lines changed

.docker/gitpod/Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# copied from https://github.com/lftcm2023/lftcm2023/blob/master/.docker/gitpod/Dockerfile
2+
3+
# gitpod doesn't support multiple FROM statements, (or rather, you can't copy from one to another)
4+
# so we just install everything in one go
5+
FROM ubuntu:jammy
6+
7+
USER root
8+
9+
RUN apt-get update && apt-get install sudo git curl git bash-completion python3 python3-pip -y && apt-get clean
10+
11+
RUN useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod \
12+
# passwordless sudo for users in the 'sudo' group
13+
&& sed -i.bkp -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers
14+
USER gitpod
15+
WORKDIR /home/gitpod
16+
17+
SHELL ["/bin/bash", "-c"]
18+
19+
# gitpod bash prompt
20+
RUN { echo && echo "PS1='\[\033[01;32m\]\u\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\]\$(__git_ps1 \" (%s)\") $ '" ; } >> .bashrc
21+
22+
# install elan
23+
RUN curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain none
24+
25+
# install whichever toolchain mathlib is currently using
26+
RUN . ~/.profile && elan toolchain install $(curl https://raw.githubusercontent.com/leanprover-community/mathlib4/master/lean-toolchain)
27+
28+
ENV PATH="/home/gitpod/.local/bin:/home/gitpod/.elan/bin:${PATH}"
29+
30+
# fix the infoview when the container is used on gitpod:
31+
ENV VSCODE_API_VERSION="1.50.0"
32+
33+
# ssh to github once to bypass the unknown fingerprint warning
34+
RUN ssh -o StrictHostKeyChecking=no github.com || true
35+
36+
# run sudo once to suppress usage info
37+
RUN sudo echo finished

.gitpod.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
image: leanprovercommunity/mathlib:gitpod
1+
image:
2+
file: .docker/gitpod/Dockerfile
23

34
vscode:
45
extensions:
5-
- jroesch.lean
6+
- leanprover.lean4
67

78
tasks:
8-
- command: . /home/gitpod/.profile && leanproject get-mathlib-cache
9+
- init: lake exe cache get

leanpkg.toml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)