Skip to content

Commit 423e80a

Browse files
authored
allow for choice of python (#42)
* allow for choice of python * keep 3.6 hard coded for pitzer * fix syntax error
1 parent e927d42 commit 423e80a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

form.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ form:
88
- auto_accounts
99
- jupyterlab_switch
1010
- spark_version
11+
- auto_modules_python
1112
- bc_num_hours
1213
- bc_num_slots
1314
- node_type
@@ -18,6 +19,12 @@ form:
1819
- bc_email_on_started
1920
- version
2021
attributes:
22+
auto_modules_python:
23+
default: false
24+
help: |
25+
Specify the Python version to match the one used in your Conda environment.
26+
This ensures compatibility when setting up the Spark cluster and helps prevent issues related
27+
to Python version mismatches.
2128
bc_num_slots:
2229
min: 1
2330
num_workers:

template/before.sh.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ module purge
138138
# Load the runtime environment
139139
runtime_env() {
140140
module purge
141-
<%- if context.cluster == 'pitzer' -%>
141+
<%- if ['pitzer'].include?(context.cluster) -%>
142142
module load python/3.6-conda5.2 spark/<%= context.spark_version %>
143143
<%- else -%>
144-
module load python/3.12 spark/<%= context.spark_version %>
144+
module load <%= context.auto_modules_python %> spark/<%= context.spark_version %>
145145
<%- end -%>
146146

147147
# Disable randomized hash for string in Python 3.3+

0 commit comments

Comments
 (0)