Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions .Xresources
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
!------------------------------------------------------------------------------
! This is a sample ~/.Xresources file, demonstrating some basic X/Motif and
! EMWM configuration. Refer to EMWM FAQ/Guide and manpages for further info.
!------------------------------------------------------------------------------

!------------------------------------------------------------------------------
! Global X/Motif setup
!------------------------------------------------------------------------------

!! Make sure to adjust this for your screen to have properly sized fonts
Xft.dpi: 160

!! Default variable width font for all Motif user interface elements
*renderTable.variable.fontType: FONT_IS_XFT
*renderTable.variable.fontName: Liberation Sans
*renderTable.variable.fontSize: 10
*renderTable: variable

!! In case fixed width font is preferred for text input widgets...
*renderTable.fixed.fontType: FONT_IS_XFT
*renderTable.fixed.fontName: Liberation Mono
*renderTable.fixed.fontSize: 10
!! ...uncomment lines below to enable
! *XmText*renderTable: fixed
! *XmTextField*renderTable: fixed

!! Default background and highlight colors
*background: #d2d2d2
*highlightColor: #5f8ba0

!! Lighter and somewhat saturated background for lists and text input widgets
*XmList.background: #b6b6aa
*XmText.background: #d3b5b5
*XmTextField.background: #d3b5b5

!! Tool tip appearance
*TipLabel.background: antiquewhite
*TipShell.borderColor: black
*TipShell.borderWidth: 1

!! Some tweaks
*multiClickTime: 260
*XmScrollBar.width: 14
*XmScrollBar.height: 14


!------------------------------------------------------------------------------
! Window and icon decorations
!------------------------------------------------------------------------------
Emwm*client*background: #8C8C8C
Emwm*client*activeBackground: #aba68c
Emwm*icon*activeBackground: #aba68c

!! Dithered frame borders (somewhat reminiscent of Indigo Magic)
! Emwm*client*topShadowPixmap: 1x1
! Emwm*client*activeTopShadowPixmap: 1x1

!------------------------------------------------------------------------------
! Client icon substitution
!------------------------------------------------------------------------------
!! Note that unless full path is given, images must reside in one of
!! default locations like $APPLRESDIR/bitmaps (see XmGetPixmap(3))
Emwm*XTerm*iconImage: terminal.xpm
Emwm*NEdit*iconImage: textedit.xpm
Emwm*XFile*iconImage: xfile.xpm

!------------------------------------------------------------------------------
! CDE 2.0 Motif look defaults
!------------------------------------------------------------------------------
*enableThinThickness: True
*enableBtn1Transfer: button2_adjust
*enableButtonTab: True
*enableDefaultButton: True
*enableEtchedInMenu: True
*enableMenuInCascade: True
*enableMultiKeyBindings: False
*enableToggleColor: True
*enableToggleVisual: False
*enableDragIcon: False

!------------------------------------------------------------------------------
! CDE 2.0 bindings for text input widgets
!------------------------------------------------------------------------------
*XmText*Translations:#override\n\
Ctrl<Key>u:delete-to-start-of-line()\n\
Ctrl<Key>k:delete-to-end-of-line()\n\
Ctrl<Key>a:beginning-of-line()\n\
Ctrl<Key>e:end-of-line()\n\
Ctrl<Key>p:process-up()\n\
Ctrl<Key>b:backward-character()\n\
Ctrl<Key>n:process-down()\n\
Ctrl<Key>f:forward-character()

*XmTextField*Translations:#override\n\
Ctrl<Key>u:delete-to-start-of-line()\n\
Ctrl<Key>k:delete-to-end-of-line()\n\
Ctrl<Key>a:beginning-of-line()\n\
Ctrl<Key>e:end-of-line()\n\
Ctrl<Key>b:backward-character()\n\
Ctrl<Key>f:forward-character()

!----------------------------------- EOF --------------------------------------
! $Id: Xresources-sample,v 1.8 2024/12/25 21:30:19 alx Exp alx $
8 changes: 8 additions & 0 deletions .bashrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
alias amrvis2d='/Amrvis2D/amrvis2d.gnu.ex'
alias amrvis3d='/Amrvis3D/amrvis3d.gnu.ex'
alias amrprofparser='/AmrProfParser/amrvis2d.gnu.TRACE_PROF.ex'

echo "*** Welcome to Amrvis-container! ***"
echo ""
echo "Type 'amrvis2d' or 'amrvis3d' to start Amrvis."
echo "Type 'amrprofparser' to start AmrProfParser."
echo "Exiting this terminal will stop this container."
echo ""

Binary file modified Amrvis.pdf
Binary file not shown.
54 changes: 45 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,19 @@ FROM mcr.microsoft.com/devcontainers/cpp:ubuntu-24.04

RUN apt-get --yes -qq update \
&& apt-get --yes -qq upgrade \
&& apt-get --yes -qq install build-essential m4 \
libmotif-dev libxext-dev libxpm-dev \
&& apt-get --yes -qq install build-essential gfortran m4 bison flex \
libmotif-dev libxext-dev libxpm-dev libxinerama-dev libjpeg-dev \
python3-setuptools \
&& apt-get --yes -qq clean \
&& rm -rf /var/lib/apt/lists/*

## add xpra repositories
RUN git clone https://github.com/Xpra-org/xpra && cd xpra \
&& ./setup.py install-repo

# install xpra
RUN apt-get --yes -qq update && apt-get --yes -qq upgrade \
&& apt-get --yes -qq install xpra xpra-html5 \
&& apt-get --yes -qq clean \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -13,21 +24,46 @@ RUN git clone https://ccse.lbl.gov/pub/Downloads/volpack.git && cd volpack && ma
## download AMReX
RUN git clone https://github.com/AMReX-Codes/amrex.git

## build AmrProfParser
RUN git clone https://github.com/BenWibking/Amrvis.git AmrProfParser && cd AmrProfParser && git checkout logspace-colorbar
COPY GNUmakefile AmrProfParser/GNUmakefile
RUN cd AmrProfParser && make DIM=2 USE_PROFPARSER=TRUE -j`nproc`

## build Amrvis (2D)
RUN git clone https://github.com/AMReX-Codes/Amrvis.git Amrvis2D
COPY GNUmakefile.2d Amrvis2D/GNUmakefile
RUN cd Amrvis2D && make -j`nproc`
RUN git clone https://github.com/BenWibking/Amrvis.git Amrvis2D && cd Amrvis2D && git checkout logspace-colorbar
COPY GNUmakefile Amrvis2D/GNUmakefile
RUN cd Amrvis2D && make DIM=2 -j`nproc`

## build Amrvis (3D)
RUN git clone https://github.com/AMReX-Codes/Amrvis.git Amrvis3D
COPY GNUmakefile.3d Amrvis3D/GNUmakefile
RUN cd Amrvis3D && make -j`nproc`
RUN git clone https://github.com/BenWibking/Amrvis.git Amrvis3D && cd Amrvis3D && git checkout logspace-colorbar
COPY GNUmakefile Amrvis3D/GNUmakefile
RUN cd Amrvis3D && make DIM=3 -j`nproc`

## build X11 file viewer
RUN wget https://fastestcode.org/dl/xfile-src-1.0-beta.tar.xz && tar xvf xfile-src-1.0-beta.tar.xz
RUN cd xfile-beta && make Linux && make install

## build X11 image viewer
RUN apt-get --yes -qq update \
&& apt-get --yes -qq upgrade \
&& apt-get --yes -qq install libjpeg-dev libtiff-dev x11-apps xpdf nedit \
&& apt-get --yes -qq clean \
&& rm -rf /var/lib/apt/lists/*
RUN wget https://fastestcode.org/dl/ximaging-src-1.8.tar.xz && tar xvf ximaging-src-1.8.tar.xz
RUN cd ximaging-src-1.8 && make Linux && make install

## copy settings
COPY .bashrc /home/vscode/.bashrc
COPY amrvis.defaults /home/vscode/.amrvis.defaults
COPY Palette /home/vscode/Palette

## configure X11 server
COPY ./xpra.conf /etc/xpra/xpra.conf
COPY ./start_http_server.sh /home/vscode/start_http_server.sh
RUN mkdir -p /run/user/1000 && chown vscode /run/user/1000
ENV XDG_RUNTIME_DIR=/run/user/1000
EXPOSE 8080

WORKDIR /home/vscode
USER vscode
CMD [ "/Amrvis3D/amrvis3d.gnu.ex" ]
CMD [ "./start_http_server.sh" ]
File renamed without changes.
Loading