File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212fi
1313echo " Detected ${NUM_GPUS} GPU(s)"
1414
15- # Add model directory to Python path
16- export PYTHONPATH=" /opt/ml/model:${PYTHONPATH} "
15+ # Add model directory and SDK code/ subdir to Python path
16+ export PYTHONPATH=" /opt/ml/model:/opt/ml/model/code: ${PYTHONPATH} "
1717
1818# Install runtime requirements if present
1919if [ -f " /opt/ml/model/code/requirements.txt" ]; then
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ echo "Detected ${NUM_GPUS} GPU(s)"
1919if [ $# -eq 0 ] || [ " $1 " = " serve" ]; then
2020 echo " Starting Ray Serve for SageMaker..."
2121
22- # Add model directory to Python path before ray start
23- export PYTHONPATH=" /opt/ml/model:${PYTHONPATH} "
22+ # Add model directory and SDK code/ subdir to Python path before ray start
23+ export PYTHONPATH=" /opt/ml/model:/opt/ml/model/code: ${PYTHONPATH} "
2424
2525 # Install runtime requirements before Ray starts
2626 if [ -f " /opt/ml/model/code/requirements.txt" ]; then
You can’t perform that action at this time.
0 commit comments