Skip to content

Commit 336c20d

Browse files
committed
Installing python 11
1 parent d9bfa1d commit 336c20d

File tree

1 file changed

+19
-70
lines changed

1 file changed

+19
-70
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ permissions:
2626
env:
2727
NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
2828
ISAACSIM_BASE_IMAGE: ${{ vars.ISAACSIM_BASE_IMAGE || 'nvcr.io/nvidia/isaac-sim' }}
29-
ISAACSIM_BASE_VERSION: ${{ vars.ISAACSIM_BASE_VERSION || '5.0.0' }}
29+
ISAACSIM_BASE_VERSION: ${{ vars.ISAACSIM_BASE_VERSION || '5.1.0' }}
3030
DOCKER_IMAGE_TAG: isaac-lab-dev:${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.ref_name }}-${{ github.sha }}
3131

3232
jobs:
@@ -161,13 +161,6 @@ jobs:
161161
fetch-depth: 0
162162
lfs: true
163163

164-
<<<<<<< HEAD
165-
<<<<<<< HEAD
166-
- name: Setup Python 3.11
167-
uses: actions/setup-python@v5
168-
with:
169-
python-version: '3.11'
170-
171164
- name: Setup Isaac Sim and Isaac Lab Environment
172165
shell: powershell
173166
run: |
@@ -176,7 +169,20 @@ jobs:
176169
# Check if virtual environment exists, create if not
177170
if (-not (Test-Path "env_isaaclab")) {
178171
Write-Host "Creating Python 3.11 virtual environment..."
179-
python -m venv env_isaaclab
172+
173+
# Use the pre-installed Python 3.11 on the self-hosted runner
174+
$python311Path = "C:\Python311\python.exe"
175+
176+
if (Test-Path $python311Path) {
177+
Write-Host "Using Python 3.11 from: $python311Path"
178+
& $python311Path -m venv env_isaaclab
179+
} elseif (Get-Command py -ErrorAction SilentlyContinue) {
180+
Write-Host "Using Python launcher (py -3.11) to create virtual environment..."
181+
py -3.11 -m venv env_isaaclab
182+
} else {
183+
Write-Host "WARNING: Python 3.11 not found at expected location. Using default python..."
184+
python -m venv env_isaaclab
185+
}
180186
} else {
181187
Write-Host "Virtual environment already exists"
182188
}
@@ -190,61 +196,14 @@ jobs:
190196
python -m pip install --upgrade pip
191197
192198
# Check if Isaac Sim is installed
193-
$isaacsimInstalled = python -c "import isaacsim; print('installed')" 2>$null
194-
if ($isaacsimInstalled -ne "installed") {
195-
Write-Host "Installing Isaac Sim from NVIDIA PyPI..."
196-
pip install "isaacsim[all,extscache]==5.1.0" --extra-index-url https://pypi.nvidia.com
197-
} else {
198-
Write-Host "Isaac Sim already installed"
199-
}
200-
201-
# Install/update PyTorch with CUDA support
202-
Write-Host "Installing PyTorch with CUDA 12.8..."
203-
pip install -U torch==2.7.0 torchvision==0.22.0 --index-url https://download.pytorch.org/whl/cu128
204-
205-
# Install Isaac Lab dependencies
206-
Write-Host "Installing Isaac Lab..."
207-
& ".\isaaclab.bat" -i
208-
209-
# Verify pytest is available
210-
Write-Host "Verifying pytest installation..."
211-
python -m pip show pytest
212-
=======
213-
- name: Setup Isaac Sim Environment
214-
=======
215-
- name: Setup Isaac Sim and Isaac Lab Environment
216-
>>>>>>> e14e983263 (Installing Isaac SIM deps)
217-
shell: powershell
218-
run: |
219-
Write-Host "Setting up Isaac Sim and Isaac Lab environment for Windows..."
199+
Write-Host "Checking if Isaac Sim is already installed..."
200+
$isaacsimCheck = python -c "try:`n import isaacsim`n print('installed')`nexcept:`n print('not_installed')" 2>&1
220201
221-
# Check if virtual environment exists, create if not
222-
if (-not (Test-Path "env_isaaclab")) {
223-
Write-Host "Creating Python 3.11 virtual environment..."
224-
python3.11 -m venv env_isaaclab
202+
if ($isaacsimCheck -match "installed") {
203+
Write-Host "Isaac Sim already installed"
225204
} else {
226-
Write-Host "Virtual environment already exists"
227-
}
228-
229-
# Activate virtual environment
230-
Write-Host "Activating virtual environment..."
231-
& "env_isaaclab\Scripts\Activate.ps1"
232-
233-
# Upgrade pip
234-
Write-Host "Upgrading pip..."
235-
python -m pip install --upgrade pip
236-
<<<<<<< HEAD
237-
python -m pip install pytest pytest-timeout prettytable junitparser
238-
>>>>>>> 433bc2050f (Adds basic CI verification on Windows)
239-
=======
240-
241-
# Check if Isaac Sim is installed
242-
$isaacsimInstalled = python -c "import isaacsim; print('installed')" 2>$null
243-
if ($isaacsimInstalled -ne "installed") {
244205
Write-Host "Installing Isaac Sim from NVIDIA PyPI..."
245206
pip install "isaacsim[all,extscache]==5.1.0" --extra-index-url https://pypi.nvidia.com
246-
} else {
247-
Write-Host "Isaac Sim already installed"
248207
}
249208
250209
# Install/update PyTorch with CUDA support
@@ -258,7 +217,6 @@ jobs:
258217
# Verify pytest is available
259218
Write-Host "Verifying pytest installation..."
260219
python -m pip show pytest
261-
>>>>>>> e14e983263 (Installing Isaac SIM deps)
262220
263221
- name: Run General Tests on Windows
264222
id: run-general-tests-windows
@@ -267,18 +225,9 @@ jobs:
267225
run: |
268226
Write-Host "Running general tests on Windows..."
269227
270-
<<<<<<< HEAD
271-
<<<<<<< HEAD
272-
# Activate virtual environment
273-
& "env_isaaclab\Scripts\Activate.ps1"
274-
275-
=======
276-
>>>>>>> 433bc2050f (Adds basic CI verification on Windows)
277-
=======
278228
# Activate virtual environment
279229
& "env_isaaclab\Scripts\Activate.ps1"
280230
281-
>>>>>>> e14e983263 (Installing Isaac SIM deps)
282231
# Create reports directory
283232
New-Item -ItemType Directory -Force -Path "reports" | Out-Null
284233

0 commit comments

Comments
 (0)