-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
123 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#------------------------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. | ||
#------------------------------------------------------------------------------------------------------------- | ||
|
||
# To fully customize the contents of this image, use the following Dockerfile instead: | ||
# https://github.com/microsoft/vscode-dev-containers/tree/v0.117.1/containers/codespaces-linux/.devcontainer/Dockerfile | ||
FROM mcr.microsoft.com/vscode/devcontainers/universal:0-linux | ||
|
||
# ** [Optional] Uncomment this section to install additional packages. ** | ||
# | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN sudo apt-get update \ | ||
&& sudo apt-get -y install --no-install-recommends \ | ||
build-essential gfortran gcc g++ quantum-espresso \ | ||
gfortran quantum-espresso quantum-espresso-data libopenmpi-dev \ | ||
make git cmake ninja-build \ | ||
# | ||
# Clean up | ||
&& sudo apt-get autoremove -y \ | ||
&& sudo apt-get clean -y \ | ||
&& sudo rm -rf /var/lib/apt/lists/* | ||
ARG pyver=3.6 | ||
RUN /opt/python/${pyver}/bin/python -m venv /home/codespace/venv | ||
RUN . /home/codespace/venv/bin/activate \ | ||
&& pip install --upgrade pip \ | ||
&& pip install setuptools wheel scikit-build "cmake!=3.16.3" ninja \ | ||
&& pip install cython numpy flake8 mypy black pytest \ | ||
&& pip install sphinx sphinx-autobuild rstcheck | ||
ENV DEBIAN_FRONTEND=dialog |
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,41 @@ | ||
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.117.1/containers/codespaces-linux | ||
{ | ||
"name": "Codespaces", | ||
"dockerFile": "Dockerfile", | ||
"remoteUser": "codespace", | ||
"workspaceMount": "source=${localWorkspaceFolder},target=/home/codespace/workspace,type=bind,consistency=cached", | ||
"workspaceFolder": "/home/codespace/workspace", | ||
"runArgs": [ | ||
"--cap-add=SYS_PTRACE", | ||
"--security-opt", | ||
"seccomp=unconfined" | ||
], | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"ms-vsonline.vsonline", | ||
"GitHub.vscode-pull-request-github", | ||
"MS-vsliveshare.vsliveshare", | ||
"VisualStudioExptTeam.vscodeintellicode", | ||
"ms-python.python", | ||
"lextudio.restructuredtext", | ||
"tcwalther.cython", | ||
"twxs.cmake" | ||
], | ||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"python.formatting.provider": "black", | ||
"python.linting.pylintEnabled": false, | ||
"python.linting.flake8Enabled": true, | ||
"python.testing.pytestEnabled": true, | ||
"python.pythonPath": "/home/codespace/venv/bin/python", | ||
"python.venvFolders": [ | ||
"venv" | ||
], | ||
"cmake.cmakePath": "/home/codespace/venv/lib/python3.6/site-packages/cmake/data/bin/cmake" | ||
}, | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "uname -a" | ||
} |
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,47 @@ | ||
#!/nix/store/iqak4y6kxnjzz37idsffd2jha52wz31x-bash-4.4-p23/bin/bash | ||
#-------------------------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. | ||
#-------------------------------------------------------------------------------------------------------------- | ||
|
||
set -ex | ||
|
||
splitSdksDir="/opt/dotnet/sdks" | ||
|
||
allSdksDir="/home/codespace/.dotnet" | ||
mkdir -p "$allSdksDir" | ||
|
||
# Copy latest muxer and license files | ||
cp -f "$splitSdksDir/3/dotnet" "$allSdksDir" | ||
cp -f "$splitSdksDir/3/LICENSE.txt" "$allSdksDir" | ||
cp -f "$splitSdksDir/3/ThirdPartyNotices.txt" "$allSdksDir" | ||
|
||
function createLinks() { | ||
local sdkVersion="$1" | ||
local runtimeVersion="$2" | ||
|
||
cd "$splitSdksDir/$sdkVersion" | ||
|
||
# Find folders with name as sdk or runtime version | ||
find . -name "$sdkVersion" -o -name "$runtimeVersion" | while read subPath; do | ||
# Trim beginning 2 characters from the line which currently looks like, for example, './sdk/2.2.402' | ||
subPath="${subPath:2}" | ||
|
||
linkFrom="$allSdksDir/$subPath" | ||
linkFromParentDir=$(dirname $linkFrom) | ||
mkdir -p "$linkFromParentDir" | ||
|
||
linkTo="$splitSdksDir/$sdkVersion/$subPath" | ||
ln -s $linkTo $linkFrom | ||
done | ||
} | ||
|
||
createLinks "3.1.201" "3.1.3" | ||
echo | ||
createLinks "3.0.103" "3.0.3" | ||
echo | ||
createLinks "2.2.402" "2.2.7" | ||
echo | ||
createLinks "2.1.805" "2.1.17" | ||
echo | ||
createLinks "1.1.14" "1.1.13" |
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,3 @@ | ||
.venv/ | ||
.direnv/ | ||
_skbuild/ |
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 |
---|---|---|
|
@@ -146,4 +146,4 @@ shell.nix | |
.local/ | ||
.vim/ | ||
.direnv/ | ||
.clang | ||
.clang |
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