Skip to content

Commit

Permalink
Fix codespace build (#3178)
Browse files Browse the repository at this point in the history
  • Loading branch information
BernieWhite authored Nov 11, 2024
1 parent 6edffa5 commit 8394d09
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
15 changes: 5 additions & 10 deletions .devcontainer/container-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@
# Note:
# This is run during container creation.

# Install Python 3 dependencies
sudo apt-get update
sudo apt-get install dotnet-sdk-8.0 -y
sudo apt-get install python3-pip -y
sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install wheel
sudo apt-get update -y
sudo apt-get upgrade -y
dotnet restore

# Install Python packages
pip install -r requirements-docs.txt
# . /home/vscode/python/dev/bin/Activate.ps1

# Restore .NET packages
dotnet restore
pip install -r requirements-docs.txt

# Install PowerShell dependencies
$ProgressPreference = [System.Management.Automation.ActionPreference]::SilentlyContinue;
Expand Down
16 changes: 7 additions & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"terminal.integrated.defaultProfile.linux": "pwsh",
"terminal.integrated.profiles.linux": {
"pwsh": {
"path": "/usr/local/bin/pwsh"
"path": "/usr/bin/pwsh"
}
}
},
Expand All @@ -34,17 +34,15 @@
"ghcr.io/devcontainers/features/github-cli:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/powershell:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/python:1": {
"ghcr.io/devcontainers/features/azure-cli": {
"version": "latest"
},
"ghcr.io/devcontainers/features/azure-cli": {
"ghcr.io/devcontainers/features/python": {
"version": "latest"
}
},
"onCreateCommand": "sudo chown -R vscode:vscode /opt/microsoft/powershell/7/pwsh && sudo chmod u+x /opt/microsoft/powershell/7/pwsh && wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && sudo dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb && sudo apt-get update && sudo apt-get install dotnet-sdk-8.0 -y && sudo apt-get install python3-pip -y",
"updateContentCommand": "/opt/microsoft/powershell/7/pwsh -f .devcontainer/container-build.ps1",
"postStartCommand": "/opt/microsoft/powershell/7/pwsh -f .devcontainer/container-start.ps1"
"onCreateCommand": "dotnet tool install --global PowerShell --version 7.4.6 && sudo chown -R vscode:vscode /usr/bin/pwsh && sudo apt-get update -y && sudo apt-get upgrade -y && dotnet restore && pip install -r requirements-docs.txt && ln /usr/bin/pwsh /home/vscode/.dotnet/tools/pwsh --force",
"updateContentCommand": "/usr/bin/pwsh -f .devcontainer/container-build.ps1",
"postStartCommand": "/usr/bin/pwsh -f .devcontainer/container-start.ps1"
// && sudo apt-get install python3-pip python3-wheel python3-venv -y && python3 -m venv /home/vscode/python/dev && echo \"source /home/vscode/python/dev/bin/activate\" >> /home/vscode/.bashrc &&
}

0 comments on commit 8394d09

Please sign in to comment.