zohadev commited on
Commit
8bc19c7
·
verified ·
1 Parent(s): 8aebc1f

Upload 3 files

Browse files
Files changed (3) hide show
  1. Dockerfile +25 -0
  2. README.md +5 -4
  3. setup.sh +12 -0
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ RUN apt update -y && apt install -y curl
4
+ RUN curl -fsSL https://code-server.dev/install.sh | sh
5
+
6
+ RUN apt install -y \
7
+ git gcc wget gzip busybox sudo ffmpeg 7z go rustup golang
8
+
9
+ RUN useradd user
10
+ RUN mkdir /home/user
11
+ RUN chown user /home/user
12
+
13
+ USER user
14
+ COPY setup.sh /home/user/setup.sh
15
+ RUN bash /home/user/setup.sh
16
+
17
+
18
+ USER root
19
+
20
+ RUN busybox --install /bin
21
+
22
+ RUN chsh -s bash
23
+
24
+ USER root
25
+ CMD bash -c "code-server --bind-addr 0.0.0.0:6378 --auth none"
README.md CHANGED
@@ -1,10 +1,11 @@
1
  ---
2
- title: Codes
3
- emoji: 📉
4
- colorFrom: blue
5
- colorTo: pink
6
  sdk: docker
7
  pinned: false
 
8
  ---
9
 
10
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: Rust Code Server
3
+ emoji: 🐨
4
+ colorFrom: red
5
+ colorTo: indigo
6
  sdk: docker
7
  pinned: false
8
+ app_port: 6378
9
  ---
10
 
11
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
setup.sh ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ code-server --install-extension rust-lang.rust-analyzer
2
+ code-server --install-extension ms-vscode.atom-keymap
3
+ code-server --install-extension emroussel.atomize
4
+ code-server --install-extension pkief.material-icon-theme
5
+ code-server --install-extension tamasfe.even-better-toml
6
+
7
+ curl -L https://sh.rustup.rs | sh
8
+ curl -L https://bun.sh/install | bash
9
+ curl -L https://get.wasmer.io | bash
10
+
11
+ echo ". ~/.profile" > /home/user/.bashrc
12
+ echo "PS1='\W\\$ '" > /home/user/.bashrc