forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wasm][mt] Add MT option to container configs (dotnet#99615)
* Add MT option. * Add configuration, fix function not defined.
- Loading branch information
1 parent
8790a2f
commit cb7154d
Showing
4 changed files
with
150 additions
and
7 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
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,60 @@ | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/dotnet/.devcontainer/base.Dockerfile | ||
# For details on dotnet specific container, see: https://github.com/microsoft/vscode-dev-containers/tree/main/containers/dotnet | ||
|
||
# [Choice] .NET version: 6.0, 7.0 | ||
ARG VARIANT="6.0-jammy" | ||
FROM mcr.microsoft.com/devcontainers/dotnet:0-${VARIANT} | ||
|
||
# Set up machine requirements to build the repo and the gh CLI | ||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install --no-install-recommends \ | ||
cmake \ | ||
llvm \ | ||
clang \ | ||
build-essential \ | ||
python3 \ | ||
curl \ | ||
git \ | ||
lldb \ | ||
liblldb-dev \ | ||
libunwind8 \ | ||
libunwind8-dev \ | ||
gettext \ | ||
libicu-dev \ | ||
liblttng-ust-dev \ | ||
libssl-dev \ | ||
libkrb5-dev \ | ||
zlib1g-dev \ | ||
ninja-build | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
# Install LTS npm and node | ||
RUN source /usr/local/share/nvm/nvm.sh && nvm install --lts | ||
|
||
# Install V8 Engine | ||
RUN curl -sSL "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/linux/chromium-v8/v8-linux64-rel-10.8.168.zip" -o ./v8.zip \ | ||
&& unzip ./v8.zip -d /usr/local/v8 \ | ||
&& echo $'#!/usr/bin/env bash\n\ | ||
"/usr/local/v8/d8" --snapshot_blob="/usr/local/v8/snapshot_blob.bin" "$@"\n' > /usr/local/bin/v8 \ | ||
&& chmod +x /usr/local/bin/v8 | ||
|
||
# install chromium dependencies to run debugger tests: | ||
RUN sudo apt-get install libnss3 -y \ | ||
&& apt-get install libatk1.0-0 -y \ | ||
&& apt-get install libatk-bridge2.0-0 -y \ | ||
&& apt-get install libcups2 -y \ | ||
&& apt-get install libdrm2 -y \ | ||
&& apt-get install libxkbcommon-x11-0 -y \ | ||
&& apt-get install libxcomposite-dev -y \ | ||
&& apt-get install libxdamage1 -y \ | ||
&& apt-get install libxrandr2 -y \ | ||
&& apt-get install libgbm-dev -y \ | ||
&& apt-get install libpango-1.0-0 -y \ | ||
&& apt-get install libcairo2 -y \ | ||
&& apt-get install libasound2 -y | ||
|
||
# install firefox dependencies to run debugger tests: | ||
RUN sudo apt-get install libdbus-glib-1-2 -y \ | ||
&& apt-get install libgtk-3-0 -y \ | ||
&& apt-get install libx11-xcb-dev -y |
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,65 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. | ||
{ | ||
"name": "WASM multithreaded development (prebuilt)", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
// Update 'VARIANT' to pick a .NET Core version: 6.0, 7.0 | ||
"VARIANT": "6.0-jammy" | ||
} | ||
}, | ||
"hostRequirements": { | ||
"cpus": 4, | ||
"memory": "8gb" | ||
}, | ||
|
||
"features": { | ||
"ghcr.io/devcontainers/features/github-cli:1": {} | ||
}, | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"ms-dotnettools.csharp" | ||
], | ||
"settings": { | ||
// Loading projects on demand is better for larger codebases | ||
"omnisharp.enableMsBuildLoadProjectsOnDemand": true, | ||
"omnisharp.enableRoslynAnalyzers": true, | ||
"omnisharp.enableEditorConfigSupport": true, | ||
"omnisharp.enableAsyncCompletion": true, | ||
"omnisharp.testRunSettings": "${containerWorkspaceFolder}/artifacts/obj/vscode/.runsettings" | ||
} | ||
} | ||
}, | ||
|
||
// Use 'onCreateCommand' to run pre-build commands inside the codespace | ||
"onCreateCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/onCreateCommand.sh wasm-multithreaded", | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "${containerWorkspaceFolder}/.devcontainer/scripts/postCreateCommand.sh", | ||
|
||
// Add the locally installed dotnet to the path to ensure that it is activated | ||
// This allows developers to just use 'dotnet build' on the command-line, and the local dotnet version will be used. | ||
// Add the global tools dir to the PATH so that globally installed tools will work | ||
"remoteEnv": { | ||
"PATH": "${containerWorkspaceFolder}/.dotnet:${containerWorkspaceFolder}/.dotnet-tools-global:${containerEnv:PATH}", | ||
"DOTNET_MULTILEVEL_LOOKUP": "0", | ||
// Path to provisioned Emscripten SDK, for rebuilding the wasm runtime | ||
"EMSDK_PATH": "${containerWorkspaceFolder}/src/mono/browser/emsdk", | ||
}, | ||
|
||
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "vscode", | ||
|
||
// Forward mono samples port | ||
"forwardPorts": [8000], | ||
"portsAttributes": { | ||
"8000": { | ||
"label": "mono wasm samples (8000)", | ||
} | ||
} | ||
} |
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