Procházet zdrojové kódy

[devcontainer] install ocmal stuff (#4798)

For gc proposal spec test
liang.he před 1 týdnem
rodič
revize
a60c707a5a
2 změnil soubory, kde provedl 14 přidání a 9 odebrání
  1. 8 9
      .devcontainer/Dockerfile
  2. 6 0
      .devcontainer/finalize.sh

+ 8 - 9
.devcontainer/Dockerfile

@@ -12,15 +12,14 @@ ENV TZ=Asia/Shanghai
 RUN apt-get update \
   && apt-get upgrade -y
 
-RUN apt-get install -y apt-transport-https apt-utils build-essential \
-  ca-certificates ccache clang-format-14 curl file g++-multilib git gnupg \
-  libgcc-12-dev lib32gcc-12-dev libzstd-dev lsb-release \
-  ninja-build ocaml ocamlbuild \
-  python3-venv python3-pip \
-  software-properties-common tree tzdata \
-  unzip valgrind vim wget zip --no-install-recommends \
-  && apt-get clean -y \
-  && rm -rf /var/lib/apt/lists/*
+RUN apt-get update \
+  && apt-get install -y apt-transport-https apt-utils build-essential \
+      ca-certificates ccache clang-format-14 curl file g++-multilib git gnupg \
+      libgcc-12-dev lib32gcc-12-dev libzstd-dev lsb-release \
+      ninja-build ocaml ocamlbuild opam \
+      python3-venv python3-pip \
+      software-properties-common tree tzdata \
+      unzip valgrind vim wget zip --no-install-recommends
 
 WORKDIR /opt
 

+ 6 - 0
.devcontainer/finalize.sh

@@ -3,10 +3,16 @@ echo "Running finalize script..."
 #
 # Python Package Installation
 #
+echo "--- Installing Python Dependencies\n"
 
 # Upgrade pip first
 python3 -m pip install --no-cache-dir --break-system-packages --upgrade pip
 # Install required packages
 pip3 install --no-cache-dir --break-system-packages -r .devcontainer/requirements.txt
 
+echo "--- Installing Ocaml stuff\n"
+opam init --yes --shell-setup
+eval $(opam env --switch=default)
+opam install --yes dune menhir
+
 echo "Finalize script completed. ✅"