-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update devcontainer postCreate.sh script
add more logging messages
- Loading branch information
Showing
1 changed file
with
11 additions
and
8 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 |
---|---|---|
@@ -1,16 +1,19 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
## This script is run after the devcontainer is created. It installs the necessary dependencies for the project. | ||
pwd | ||
git submodule update --init --recursive | ||
pip install -r ./requirements.txt | ||
pip install -r ./fast-pysf/requirements.txt | ||
pip install -e . | ||
pip install -e ./fast-pysf | ||
git submodule update --init --recursive || { echo "Failed to update git submodules"; exit 1; } | ||
pip install -r ./requirements.txt || { echo "Failed to install requirements from ./requirements.txt"; exit 1; } | ||
pip install -r ./fast-pysf/requirements.txt || { echo "Failed to install requirements from ./fast-pysf/requirements.txt"; exit 1; } | ||
pip install -e . || { echo "Failed to install the current directory as a package"; exit 1; } | ||
pip install -e ./fast-pysf || { echo "Failed to install ./fast-pysf as a package"; exit 1; } | ||
|
||
# Set the display environment variable for GUI applications based on the host OS | ||
if [[ $HOST_OS == *"Windows"* ]]; then | ||
# We are in Windows | ||
echo "export DISPLAY=host.docker.internal:0.0" >> ~/.bashrc | ||
echo "export DISPLAY=host.docker.internal:0.0" >> ~/.bashrc || { echo "Failed to set DISPLAY environment variable for Windows"; exit 1; } | ||
else | ||
# We are in Linux | ||
echo "export DISPLAY=:0" >> ~/.bashrc | ||
fi | ||
echo "export DISPLAY=:0" >> ~/.bashrc || { echo "Failed to set DISPLAY environment variable for Linux"; exit 1; } | ||
fi |