-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #449 from llaniewski/feature/codespaces
Adding codespaces support
- Loading branch information
Showing
11 changed files
with
173 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM mcr.microsoft.com/devcontainers/cpp:1-debian-11 | ||
|
||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install --no-install-recommends \ | ||
openssh-server \ | ||
openmpi-bin libopenmpi-dev \ | ||
r-base-dev r-recommended qpdf | ||
|
||
COPY tools/install.sh /tmp/ | ||
RUN chmod +x /tmp/install.sh | ||
|
||
USER vscode | ||
WORKDIR /home/vscode | ||
|
||
RUN /tmp/install.sh rdep |
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,20 @@ | ||
![TCLB Solver Header](https://raw.githubusercontent.com/CFD-GO/documents/master/assets/header.png) | ||
|
||
TCLB Solver - Codespace (Small) | ||
=== | ||
|
||
**Configure** | ||
```bash | ||
make configure | ||
./configure --disable-cuda --with-openmp --enable-cpu-layout | ||
``` | ||
|
||
**Compile** | ||
```bash | ||
make d2q9 | ||
``` | ||
|
||
**Run** | ||
```bash | ||
CLB/d2q9/main example/runr/karman.xml | ||
``` |
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,20 @@ | ||
FROM mcr.microsoft.com/devcontainers/cpp:1-debian-11 | ||
|
||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install --no-install-recommends \ | ||
openssh-server \ | ||
python3-pip \ | ||
libxml2 libxml2-dev \ | ||
openmpi-bin libopenmpi-dev \ | ||
r-base-dev r-recommended qpdf \ | ||
libgl1-mesa-glx | ||
|
||
COPY tools/install.sh /tmp/ | ||
RUN chmod +x /tmp/install.sh | ||
|
||
USER vscode | ||
WORKDIR /home/vscode | ||
|
||
RUN /tmp/install.sh rdep rinside reticulate --rpackage languageserver --rpackage png | ||
RUN pip3 install vtk | ||
ENV RETICULATE_PYTHON=/usr/bin/python3 |
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,15 @@ | ||
![TCLB Solver Header](https://raw.githubusercontent.com/CFD-GO/documents/master/assets/header.png) | ||
|
||
TCLB Solver - Codespace (Big) | ||
=== | ||
|
||
This container is already configured with OpenMP support. You can now: | ||
|
||
**Compile** | ||
```bash | ||
make d2q9 | ||
``` | ||
**Run** | ||
```bash | ||
CLB/d2q9/main example/runr/karman.xml | ||
``` |
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,26 @@ | ||
{ | ||
"name": "Big (R+VTK)", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"context": "../.." | ||
}, | ||
"postCreateCommand": "make configure && ./configure --disable-cuda --enable-cpu-layout --with-openmp", | ||
"customizations": { | ||
"codespaces": { | ||
"openFiles": [ | ||
".devcontainer/big/README.md" | ||
] | ||
}, | ||
"vscode": { | ||
"extensions": [ | ||
"REditorSupport.r", | ||
"CFD-GO.tclb-helper" | ||
], | ||
"settings": { | ||
"workbench.editorAssociations": { | ||
"*.md": "vscode.markdown.preview.editor" | ||
} | ||
} | ||
} | ||
} | ||
} |
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,24 @@ | ||
{ | ||
"name": "Small", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"context": ".." | ||
}, | ||
"customizations": { | ||
"codespaces": { | ||
"openFiles": [ | ||
".devcontainer/README.md" | ||
] | ||
}, | ||
"vscode": { | ||
"extensions": [ | ||
"CFD-GO.tclb-helper" | ||
], | ||
"settings": { | ||
"workbench.editorAssociations": { | ||
"*.md": "vscode.markdown.preview.editor" | ||
} | ||
} | ||
} | ||
} | ||
} |
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,33 @@ | ||
<?xml version="1.0"?> | ||
<CLBConfig version="2.0" output="output/" permissive="true"> | ||
<Geometry nx="1024" ny="100"> | ||
<MRT><Box/></MRT> | ||
<WVelocity><Box nx="1"/></WVelocity> | ||
<EPressure><Box dx="-1"/></EPressure> | ||
<Wall mask="ALL"> | ||
<Box ny="1"/> | ||
<Box dy="-1"/> | ||
<Wedge dx="120" nx="20" dy="50" ny="20" direction="LowerRight"/> | ||
<Wedge dx="120" nx="20" dy="30" ny="20" direction="UpperRight"/> | ||
<Wedge dx="140" nx="20" dy="50" ny="20" direction="LowerLeft"/> | ||
<Wedge dx="140" nx="20" dy="30" ny="20" direction="UpperLeft"/> | ||
</Wall> | ||
</Geometry> | ||
<Model> | ||
<Param name="VelocityX" value="0.05"/> | ||
<Param name="Viscosity" value="0.01"/> | ||
</Model> | ||
<RunR> | ||
ramp = colorRamp(c("black","red","yellow","white")) | ||
</RunR> | ||
<RunR Iterations="1000" echo="no"> | ||
U = Solver$Quantities$U | ||
u = sqrt(U[1,,,1]^2+U[2,,,1]^2) | ||
u = t(u/max(u)) | ||
col = ramp(u) | ||
dim(col) = c(dim(u),3) | ||
png::writePNG(col/255, "output/view.png") | ||
system("code output/view.png") | ||
</RunR> | ||
<Solve Iterations="10000"/> | ||
</CLBConfig> |
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
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 |
---|---|---|
|
@@ -322,7 +322,6 @@ do | |
else | ||
install_rpackage "$1" | ||
fi | ||
shift | ||
;; | ||
rdep) | ||
if $GITHUB | ||
|