Browse Source

chore: update build.sh to configure Java and Rust environments, and add Docker containers for Selenium and desktop development

liuyuqi-dellpc 6 months ago
parent
commit
96399f577b
1 changed files with 27 additions and 1 deletions
  1. 27 1
      build.sh

+ 27 - 1
build.sh

@@ -5,19 +5,39 @@
 # @Desc    :   build apk
 ###############################################################################
 source /etc/profile
+echo  "source /etc/profile" >> ~/.bashrc
+
+
+# clean
+sudo journalctl --vacuum-size=1K
+# rm -rf ~/.gradle
+# rm -rf ~/.android
 
 export JAVA_HOME=/usr/local/openjdk-11
 # export JAVA_HOME=/root/.sdkman/candidates/java/21.0.1-ms/
 # source "$HOME/.sdkman/bin/sdkman-init.sh"
 # sdk list java
 # sdk install java 8.0.392-librca
-# sdk install java 11.0.24-librca
 # sdk default java 8.0.392-librca
+# sdk install java 11.0.24-librca
+# sdk install java 17.0.11-ms
 
 # docker
 # echo $DOCKER_HOST
 # unset DOCKER_HOST
 # sudo usermod -aG docker $USER
+docker run -d -p 4444:4444 -p 5900:5900 -e VNC_PASSWORD=123456 selenium/standalone-chrome
+
+docker run -d --restart=on-failure \
+    --name my_workspace \
+    --cap-add=SYS_PTRACE \
+    --gpus all  \
+    --shm-size=1024m \
+    -v /tmp/.X11-unix:/tmp/.X11-unix:rw \
+    -p 10022:22  \
+    -p 14000:4000  \
+    gezp/ubuntu-desktop:20.04-cu11.0
+
 
 # set gopath
 # export PATH=$PATH:$GOPATH/bin
@@ -27,6 +47,12 @@ export PATH=$PATH:$(go env GOPATH)/bin
 # sql
 # SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
 
+# rust
+PATH="$HOME/.cargo/bin:$PATH"
+vim /usr/bin/pack-cli/node_modules/.bin/pack-cli/src/rust/rustc
+
+pake https://git.yoqi.me --name zzky --hide-title-bar
+
 # nodejs
 export NODE_OPTIONS=--openssl-legacy-provider