Skip to content

Commit dcafe4d

Browse files
committed
add /opt/ml/model/code to PYTHONPATH for SDK-packaged tarballs
1 parent 639df69 commit dcafe4d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/ray/sagemaker_entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ echo "Detected ${NUM_GPUS} GPU(s)"
1919
if [ $# -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

0 commit comments

Comments
 (0)