-
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.
* try new approach with bases Signed-off-by: vsoch <vsoch@users.noreply.github.com>
- Loading branch information
Showing
9 changed files
with
135 additions
and
39 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
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
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,5 @@ | ||
FROM nixos/nix | ||
RUN nix-channel --update | ||
WORKDIR /code | ||
COPY shell.nix shell.nix | ||
RUN nix-env -i -f shell.nix |
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,49 @@ | ||
FROM ubuntu:22.04 | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
ENV EDITOR=vim | ||
|
||
RUN apt-get update && apt-get upgrade | ||
RUN apt-get install --yes \ | ||
ca-certificates \ | ||
bash-completion \ | ||
build-essential \ | ||
curl \ | ||
cmake \ | ||
gnupg \ | ||
htop \ | ||
jq \ | ||
less \ | ||
lsb-release \ | ||
lsof \ | ||
man-db \ | ||
nano \ | ||
ssl-cert \ | ||
sudo \ | ||
unzip \ | ||
xz-utils \ | ||
zip | ||
|
||
# install nix | ||
RUN sh <(curl -L https://nixos.org/nix/install) --daemon | ||
|
||
RUN mkdir -p $HOME/.config/nix $HOME/.config/nixpkgs && \ | ||
echo 'sandbox = false' >> $HOME/.config/nix/nix.conf && \ | ||
echo '{ allowUnfree = true; }' >> $HOME/.config/nixpkgs/config.nix && \ | ||
echo '. $HOME/.nix-profile/etc/profile.d/nix.sh' >> $HOME/.bashrc | ||
|
||
# install docker and configure daemon to use vfs as GitHub codespaces requires vfs | ||
# https://github.com/moby/moby/issues/13742#issuecomment-725197223 | ||
RUN mkdir -p /etc/apt/keyrings \ | ||
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg \ | ||
&& echo \ | ||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ | ||
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null \ | ||
&& apt-get update \ | ||
&& apt-get install --yes docker-ce docker-ce-cli containerd.io docker-compose-plugin \ | ||
&& mkdir -p /etc/docker \ | ||
&& echo '{"cgroup-parent":"/actions_job","storage-driver":"vfs"}' >> /etc/docker/daemon.json | ||
|
||
# Install our packages, enter the container in the shell | ||
WORKDIR /code | ||
COPY shell.nix shell.nix | ||
RUN $HOME/.nix-profile/bin/nix-env -i -f shell.nix |
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
{ pkgs ? import <nixpkgs> {} }: | ||
pkgs.mkShell { | ||
buildInputs = [ | ||
pkgs.openmpi | ||
pkgs.clang_14 | ||
]; | ||
} |