-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* FIX: Nix * FEAT: Update to pyproject.toml * FIX: in progress * FIX: nix installation script * FIX: Attempt to remove the venv if it can use local LD_LIBRARY_PATH * FEAT: Try again * FIX: patch setup.py * FIX: Nearly fixed envrionemnt * FEAT: Add virtualisation packages * FEAT: Develop apptainer environment * FEAT: Working apptainer isntall * FEAT: Improving mamba install * FEAT: Improving mamba install * FEAT: Improving mamba install errors * FIX: piel status * FEAT: Working micromamba installation * FEAT: Working apptainer built environment * FEAT: so far * FIX: Still getting the development setup to build * FEAT: Further status * FEAT: Start apptainer script * FEAT: Working kind of * FEAT: Working kind of * FEAT: Kind of stable * FEAT: Stable and working apptainer --------- Co-authored-by: Jadcocker <[email protected]> Co-authored-by: Dario Quintero Dominguez <[email protected]>
- Loading branch information
1 parent
85bf038
commit 945c0ce
Showing
13 changed files
with
177 additions
and
14 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 |
---|---|---|
|
@@ -196,3 +196,5 @@ waves.shm/ | |
ivl_vhdl_work/ | ||
RUN_* | ||
*.raw | ||
|
||
*.sif |
16 changes: 16 additions & 0 deletions
16
docs/sections/environment/apptainer/relevant_apptainer_commands.rst
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,16 @@ | ||
``apptainer`` Useful Commands | ||
------------------------------------------ | ||
|
||
.. list-table:: Useful ``apptainer`` commands | ||
:header-rows: 1 | ||
|
||
* - Description | ||
- Command | ||
* - Build production shell with all available CPU cores | ||
- ``apptainer instance start piel.sif pielapptainer`` | ||
* - Build production shell with all available CPU cores | ||
- ``apptainer shell instance://pielapptainer`` | ||
* - Build production shell with all available CPU cores | ||
- ``apptainer build piel.sif piel.def`` | ||
* - Build production shell with all available CPU cores | ||
- ``apptainer instance stop pielapptainer`` |
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,2 @@ | ||
cd ~/piel/environment/apptainer | ||
apptainer build --sandbox piel.sif piel.def |
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,38 @@ | ||
Bootstrap: docker | ||
From: efabless/openlane | ||
|
||
|
||
%post | ||
yum -y update | ||
yum install -y bzip2 wget | ||
|
||
# Install micromamba | ||
apt-get update && apt-get install -y wget | ||
wget -qO- https://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj bin/micromamba | ||
mkdir -p /opt/micromamba | ||
mv bin/micromamba /opt/micromamba/micromamba | ||
chmod +x /opt/micromamba/micromamba | ||
export PATH=/opt/micromamba:$PATH | ||
|
||
|
||
# Create pielenv environment in micromamba | ||
micromamba shell init -s bash | ||
micromamba create -p /opt/envs/pielenv -c conda-forge python=3.10.9 | ||
micromamba run -p /opt/envs/pielenv micromamba install gdstk -c conda-forge | ||
|
||
%environment | ||
export PATH=/opt/micromamba:$PATH | ||
export PIEL_DIRECTORY="/opt/piel/" | ||
|
||
%runscript | ||
micromamba shell init -s bash | ||
micromamba run -p /opt/envs/pielenv pip install -r $PIEL_DIRECTORY/requirements_dev.txt --break-system-packages | ||
micromamba run -p /opt/envs/pielenv pip install -e $PIEL_DIRECTORY --break-system-packages | ||
|
||
|
||
|
||
%startscript | ||
micromamba shell init -s bash | ||
micromamba run -p /opt/envs/pielenv pip install -r $PIEL_DIRECTORY/requirements_dev.txt --break-system-packages | ||
micromamba run -p /opt/envs/pielenv pip install -e $PIEL_DIRECTORY --break-system-packages | ||
|
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 @@ | ||
apptainer instance start -w piel.sif pielapptainerdev | ||
apptainer run instance://pielapptainerdev | ||
apptainer shell instance://pielapptainerdev |
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
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,34 @@ | ||
# An example package with dependencies defined via pyproject.toml | ||
{ | ||
config, | ||
lib, | ||
dream2nix, | ||
}: let | ||
pyproject = lib.importTOML (config.mkDerivation.src + ../../pyproject.toml); | ||
in { | ||
imports = [ | ||
dream2nix.modules.dream2nix.pip | ||
]; | ||
|
||
inherit (pyproject.project) name version; | ||
|
||
mkDerivation = { | ||
src = ./.; | ||
}; | ||
|
||
buildPythonPackage = { | ||
format = lib.mkForce "pyproject"; | ||
pythonImportsCheck = [ | ||
"piel" | ||
]; | ||
}; | ||
|
||
pip = { | ||
pypiSnapshotDate = "2023-08-27"; | ||
requirementsList = | ||
pyproject.build-system.requires | ||
or [] | ||
++ pyproject.project.dependencies; | ||
flattenDependencies = true; | ||
}; | ||
} |
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,42 @@ | ||
{ pkgs ? import <nixpkgs> {} | ||
}: | ||
|
||
pkgs.mkShell { | ||
buildInputs = [ | ||
pkgs.stdenv.cc.cc.lib | ||
pkgs.jupyter | ||
pkgs.which | ||
pkgs.htop | ||
pkgs.zlib | ||
pkgs.pandoc | ||
pkgs.ngspice # 41 (latest) | ||
pkgs.gtkwave # 3.3.117, from Aug 2023 (latest) | ||
pkgs.xyce # 7.6, from Nov 2022 (7.7 is latest) | ||
pkgs.verilog # 12.0, from Jun 2023 (latest) | ||
pkgs.python3Packages.virtualenv # run virtualenv . | ||
pkgs.python3Packages.numpy | ||
]; | ||
|
||
nativeBuildInputs = [ | ||
pkgs.autoPatchelfHook | ||
]; | ||
|
||
shellHook = '' | ||
export LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath [ | ||
pkgs.stdenv.cc.cc | ||
]} | ||
if [ -e ../../.venv/bin/activate ]; | ||
then source ../../.venv/bin/activate; | ||
else | ||
pip install --upgrade pip; | ||
python -m venv ../../.venv; | ||
source ../../.venv/bin/activate; | ||
pip install -r ../../requirements_dev.txt; | ||
pip install -r ../../../openlane2/requirements_dev.txt; | ||
pip install -e ../../; | ||
source ../../.venv/bin/activate; | ||
fi | ||
nix-shell ../../../openlane2/shell.nix | ||
''; | ||
LOCALE_ARCHIVE="/usr/lib/locale/locale-archive"; # let's nix read the LOCALE, to silence warning messages | ||
} |
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