Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
258 changes: 258 additions & 0 deletions build_artifacts/v3/v3.5/v3.5.2/Dockerfile

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions build_artifacts/v3/v3.5/v3.5.2/aws-cli-public-key.asc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBF2Cr7UBEADJZHcgusOJl7ENSyumXh85z0TRV0xJorM2B/JL0kHOyigQluUG
ZMLhENaG0bYatdrKP+3H91lvK050pXwnO/R7fB/FSTouki4ciIx5OuLlnJZIxSzx
PqGl0mkxImLNbGWoi6Lto0LYxqHN2iQtzlwTVmq9733zd3XfcXrZ3+LblHAgEt5G
TfNxEKJ8soPLyWmwDH6HWCnjZ/aIQRBTIQ05uVeEoYxSh6wOai7ss/KveoSNBbYz
gbdzoqI2Y8cgH2nbfgp3DSasaLZEdCSsIsK1u05CinE7k2qZ7KgKAUIcT/cR/grk
C6VwsnDU0OUCideXcQ8WeHutqvgZH1JgKDbznoIzeQHJD238GEu+eKhRHcz8/jeG
94zkcgJOz3KbZGYMiTh277Fvj9zzvZsbMBCedV1BTg3TqgvdX4bdkhf5cH+7NtWO
lrFj6UwAsGukBTAOxC0l/dnSmZhJ7Z1KmEWilro/gOrjtOxqRQutlIqG22TaqoPG
fYVN+en3Zwbt97kcgZDwqbuykNt64oZWc4XKCa3mprEGC3IbJTBFqglXmZ7l9ywG
EEUJYOlb2XrSuPWml39beWdKM8kzr1OjnlOm6+lpTRCBfo0wa9F8YZRhHPAkwKkX
XDeOGpWRj4ohOx0d2GWkyV5xyN14p2tQOCdOODmz80yUTgRpPVQUtOEhXQARAQAB
tCFBV1MgQ0xJIFRlYW0gPGF3cy1jbGlAYW1hem9uLmNvbT6JAlQEEwEIAD4CGwMF
CwkIBwIGFQoJCAsCBBYCAwECHgECF4AWIQT7Xbd/1cEYuAURraimMQrMRnJHXAUC
ZqFYbwUJCv/cOgAKCRCmMQrMRnJHXKYuEAC+wtZ611qQtOl0t5spM9SWZuszbcyA
0xBAJq2pncnp6wdCOkuAPu4/R3UCIoD2C49MkLj9Y0Yvue8CCF6OIJ8L+fKBv2DI
yWZGmHL0p9wa/X8NCKQrKxK1gq5PuCzi3f3SqwfbZuZGeK/ubnmtttWXpUtuU/Iz
VR0u/0sAy3j4uTGKh2cX7XnZbSqgJhUk9H324mIJiSwzvw1Ker6xtH/LwdBeJCck
bVBdh3LZis4zuD4IZeBO1vRvjot3Oq4xadUv5RSPATg7T1kivrtLCnwvqc6L4LnF
0OkNysk94L3LQSHyQW2kQS1cVwr+yGUSiSp+VvMbAobAapmMJWP6e/dKyAUGIX6+
2waLdbBs2U7MXznx/2ayCLPH7qCY9cenbdj5JhG9ibVvFWqqhSo22B/URQE/CMrG
+3xXwtHEBoMyWEATr1tWwn2yyQGbkUGANneSDFiTFeoQvKNyyCFTFO1F2XKCcuDs
19nj34PE2TJilTG2QRlMr4D0NgwLLAMg2Los1CK6nXWnImYHKuaKS9LVaCoC8vu7
IRBik1NX6SjrQnftk0M9dY+s0ZbAN1gbdjZ8H3qlbl/4TxMdr87m8LP4FZIIo261
Eycv34pVkCePZiP+dgamEiQJ7IL4ZArio9mv6HbDGV6mLY45+l6/0EzCwkI5IyIf
BfWC9s/USgxchg==
=ptgS
-----END PGP PUBLIC KEY BLOCK-----
72 changes: 72 additions & 0 deletions build_artifacts/v3/v3.5/v3.5.2/cpu.env.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# This file is auto-generated.
conda-forge::strands-agents[version='>=0.3.0,<0.4.0']
conda-forge::strands-agents-tools[version='>=0.1.9,<0.2.0']
conda-forge::strands-agents-mcp-server[version='>=0.1.2,<0.2.0']
conda-forge::sagemaker-gen-ai-jupyterlab-extension[version='>=1.0.11,<1.1.0']
conda-forge::mcp[version='>=1.19.0,<1.20.0']
conda-forge::uv[version='>=0.9.7,<0.10.0']
conda-forge::s3fs[version='>=2024.12.0,<2024.13.0']
conda-forge::seaborn[version='>=0.13.2,<0.14.0']
conda-forge::jupyter-activity-monitor-extension[version='>=0.3.2,<0.4.0']
conda-forge::mlflow[version='>=2.22.0,<2.23.0']
conda-forge::sagemaker-mlflow[version='>=0.1.0,<0.2.0']
conda-forge::langchain-aws[version='>=0.2.19,<0.3.0']
conda-forge::jupyter-collaboration[version='>=3.1.0,<3.2.0']
conda-forge::sagemaker-code-editor[version='>=1.7.5,<1.8.0']
conda-forge::amazon_sagemaker_sql_editor[version='>=0.1.19,<0.2.0']
conda-forge::amazon-sagemaker-sql-magic[version='>=0.1.4,<0.2.0']
conda-forge::amazon-sagemaker-jupyter-ai-q-developer[version='>=1.2.8,<1.3.0']
conda-forge::amazon-q-developer-jupyterlab-ext[version='>=3.4.8,<3.5.0']
conda-forge::langchain[version='>=0.3.27,<0.4.0']
conda-forge::fastapi[version='>=0.120.4,<0.121.0']
conda-forge::uvicorn[version='>=0.38.0,<0.39.0']
conda-forge::pytorch[version='>=2.6.0,<2.7.0']
conda-forge::tensorflow[version='>=2.18.0,<2.19.0']
conda-forge::python[version='>=3.12.9,<3.13.0']
conda-forge::pip[version='>=25.2,<25.3.0']
conda-forge::torchvision[version='>=0.21.0,<0.22.0']
conda-forge::numpy[version='>=1.26.4,<1.27.0']
conda-forge::pandas[version='>=2.3.3,<2.4.0']
conda-forge::scikit-learn[version='>=1.7.2,<1.8.0']
conda-forge::jinja2[version='>=3.1.6,<3.2.0']
conda-forge::matplotlib-base[version='>=3.10.7,<3.11.0']
conda-forge::sagemaker-headless-execution-driver[version='>=0.0.13,<0.1.0']
conda-forge::ipython[version='>=8.37.0,<8.38.0']
conda-forge::scipy[version='>=1.16.3,<1.17.0']
conda-forge::keras[version='>=3.12.0,<3.13.0']
conda-forge::py-xgboost-cpu[version='>=2.1.4,<2.2.0']
conda-forge::jupyterlab[version='>=4.4.10,<4.5.0']
conda-forge::ipywidgets[version='>=8.1.8,<8.2.0']
conda-forge::conda[version='>=25.9.1,<25.10.0']
conda-forge::boto3[version='>=1.37.3,<1.38.0']
conda-forge::sagemaker-python-sdk[version='>=2.245.0,<2.246.0']
conda-forge::supervisor[version='>=4.2.5,<4.3.0']
conda-forge::autogluon[version='>=1.4.0,<1.5.0']
conda-forge::aws-glue-sessions[version='>=1.0.9,<1.1.0']
conda-forge::sagemaker-kernel-wrapper[version='>=0.0.6,<0.1.0']
conda-forge::jupyter-ai[version='>=2.31.6,<2.32.0']
conda-forge::jupyter-scheduler[version='>=2.11.0,<2.12.0']
conda-forge::jupyter-lsp[version='>=2.3.0,<2.4.0']
conda-forge::jupyterlab-lsp[version='>=5.0.3,<5.1.0']
conda-forge::python-lsp-server[version='>=1.13.1,<1.14.0']
conda-forge::jupyterlab-git[version='>=0.51.2,<0.52.0']
conda-forge::notebook[version='>=7.4.7,<7.5.0']
conda-forge::altair[version='>=5.5.0,<5.6.0']
conda-forge::sagemaker-studio-analytics-extension[version='>=0.2.2,<0.3.0']
conda-forge::jupyter-dash[version='>=0.4.2,<0.5.0']
conda-forge::sagemaker-jupyterlab-extension[version='>=0.5.1,<0.6.0']
conda-forge::sagemaker-jupyterlab-emr-extension[version='>=0.4.3,<0.5.0']
conda-forge::amazon-sagemaker-jupyter-scheduler[version='>=3.1.15,<3.2.0']
conda-forge::jupyter-server-proxy[version='>=4.4.0,<4.5.0']
conda-forge::pyhive[version='>=0.7.0,<0.8.0']
conda-forge::python-gssapi[version='>=1.10.1,<1.11.0']
conda-forge::tf-keras[version='>=2.18.0,<2.19.0']
conda-forge::git-remote-codecommit[version='>=1.16,<1.17.0']
conda-forge::docker-cli[version='>=27.5.1,<27.6.0']
conda-forge::aioboto3[version='>=14.3.0,<14.4.0']
conda-forge::sagemaker-studio-cli[version='>=1.0.7,<1.1.0']
conda-forge::sagemaker-studio[version='>=1.0.22,<1.1.0']
conda-forge::sagemaker-studio-dataengineering-sessions[version='>=1.3.7,<1.4.0']
conda-forge::sagemaker-studio-dataengineering-extensions[version='>=1.3.2,<1.4.0']
conda-forge::amzn-sagemaker-aiops-jupyterlab-extension[version='>=1.0.4,<1.1.0']
conda-forge::aws-s3-access-grants-boto3-plugin[version='>=1.2.0,<1.3.0']
7 changes: 7 additions & 0 deletions build_artifacts/v3/v3.5/v3.5.2/cpu.pinned_env.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
conda-forge::dash[version='<=2.18.1']
conda-forge::evaluate[version='<0.4.2']
conda-forge::catboost[version='>=1.1.1,<1.3.0',build='*cpu*']
conda-forge::libsqlite[version='<3.49.0']
conda-forge::urllib3[version='<2']
conda-forge::papermill[version='>=2.6.0']
conda-forge::plotly[version='<6.1.0']
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"python.terminal.activateEnvironment": false,
"python.defaultInterpreterPath": "/opt/conda/bin/python"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extensions.autoUpdate": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
https://open-vsx.org/api/ms-toolsai/jupyter/2024.5.0/file/ms-toolsai.jupyter-2024.5.0.vsix
https://open-vsx.org/api/ms-python/python/2023.20.0/file/ms-python.python-2023.20.0.vsix
https://open-vsx.org/api/amazonwebservices/aws-toolkit-vscode/3.69.0/file/amazonwebservices.aws-toolkit-vscode-3.69.0.vsix
https://open-vsx.org/api/amazonwebservices/amazon-q-vscode/1.97.0/file/amazonwebservices.amazon-q-vscode-1.97.0.vsix
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
https://open-vsx.org/api/ms-toolsai/jupyter/2024.5.0/file/ms-toolsai.jupyter-2024.5.0.vsix
https://open-vsx.org/api/ms-python/python/2023.20.0/file/ms-python.python-2023.20.0.vsix
https://open-vsx.org/api/amazonwebservices/aws-toolkit-vscode/3.69.0/file/amazonwebservices.aws-toolkit-vscode-3.69.0.vsix
https://open-vsx.org/api/amazonwebservices/amazon-q-vscode/1.58.0/file/amazonwebservices.amazon-q-vscode-1.58.0.vsix
6 changes: 6 additions & 0 deletions build_artifacts/v3/v3.5/v3.5.2/dirs/etc/conda/.condarc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
envs_dirs:
- ~/.conda/envs
- /opt/conda/envs
pkgs_dirs:
- ~/.conda/pkgs
- /opt/conda/pkgs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Default Jupyter server config
# Note: those config can be overridden by user-level configs.

c.ServerApp.terminado_settings = {"shell_command": ["/bin/bash"]}
c.ServerApp.tornado_settings = {"compress_response": True}

# Do not delete files to trash. Instead, permanently delete files.
c.FileContentsManager.delete_to_trash = False

# Allow deleting non-empty directory via file browser. Related documentation:
# https://github.com/jupyter-server/jupyter_server/blob/main/jupyter_server/services/contents/filemanager.py#L125-L129
c.FileContentsManager.always_delete_dir = True

# Enable `allow_hidden` by default, so hidden files are accessible via Jupyter server
# Related documentation: https://jupyterlab.readthedocs.io/en/stable/user/files.html#displaying-hidden-files
c.ContentsManager.allow_hidden = True

# This will set the LanguageServerManager.extra_node_roots setting if amazon_sagemaker_sql_editor exists in the
# environment. Ignore otherwise, don't fail the JL server start
# Related documentation: https://jupyterlab-lsp.readthedocs.io/en/v3.4.0/Configuring.html
try:
import os

module = __import__("amazon_sagemaker_sql_editor")
module_location = os.path.dirname(module.__file__)
c.LanguageServerManager.extra_node_roots = [f"{module_location}/sql-language-server"]
except:
pass
114 changes: 114 additions & 0 deletions build_artifacts/v3/v3.5/v3.5.2/dirs/etc/patches/apply_patches.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
#!/bin/bash

set -eux

# Function to compare version numbers
# Returns 0 if version1 >= version2, 1 otherwise
version_gte() {
local version1="$1"
local version2="$2"

# Handle empty versions
[ -z "$version1" ] && return 1
[ -z "$version2" ] && return 0

# If versions are identical, return true
[ "$version1" = "$version2" ] && return 0

# Use sort -V (version sort) to compare versions
# Check if version1 comes after version2 in version sort
local sorted=$(printf '%s\n%s\n' "$version1" "$version2" | sort -V)
local first_line=$(echo "$sorted" | head -n1)

# If version2 comes first in sort, then version1 >= version2
[ "$first_line" = "$version2" ]
}

get_package_version() {
local package_name="$1"

# Try to get version using pip show
local pkg_version=$(pip show "$package_name" 2>/dev/null | grep "Version:" | cut -d' ' -f2)

if [ -z "$pkg_version" ]; then
# Try using conda list as fallback
pkg_version=$(conda list "$package_name" 2>/dev/null | grep "^$package_name " | awk '{print $2}' | head -n1)
fi

echo "$pkg_version"
}

# NOTE: Consider removing these patches entirely if all non-deprecating SMD versions
# have package versions larger than the specified thresholds, as the patches would
# no longer be needed.
should_skip_patch() {
local patch_file="$1"
local patch_basename=$(basename "$patch_file")

# Check if patch filename contains "fix-ipython-display"
if [[ "$patch_basename" == *"fix-ipython-display"* ]]; then
# Skip this patch if hdijupyterutils >= 0.23.0
local hdijupyterutils_version=$(get_package_version "hdijupyterutils")
if [ -n "$hdijupyterutils_version" ]; then
if version_gte "$hdijupyterutils_version" "0.23.0"; then
echo "Skipping $patch_basename: hdijupyterutils version $hdijupyterutils_version >= 0.23"
return 0
fi
fi
fi

# Check if patch filename contains "fix-boto3-endpoints"
if [[ "$patch_basename" == *"fix-boto3-endpoints"* ]]; then
# Skip this patch if botocore >= 1.37.17
local botocore_version=$(get_package_version "botocore")
if [ -n "$botocore_version" ]; then
if version_gte "$botocore_version" "1.37.17"; then
echo "Skipping $patch_basename: botocore version $botocore_version >= 1.37.17"
return 0
fi
fi
fi

return 1
}

# Check if parameter is provided
if [ $# -ne 1 ]; then
echo "Usage: $0 [smus|smus-code-editor]"
exit 1
fi

# Validate parameter
case "$1" in
"smus")
bash "/etc/patches/smus-script/replace-job-with-schedule.sh"
PATCH_DIR="/etc/patches/smus"
;;
"smus-code-editor")
PATCH_DIR="/etc/patches/smus-code-editor"
;;
*)
echo "Error: Parameter must be either 'smus' or 'smus-code-editor'"
exit 1
;;
esac

# Check if patch directory exists
if [ ! -d "$PATCH_DIR" ]; then
echo "Error: Patch directory $PATCH_DIR does not exist"
exit 1
fi

# Patch files can be generated via "diff -u /path/to/original_file /path/to/new_file > XXX_bad_package.patch"
# See https://www.thegeekstuff.com/2014/12/patch-command-examples/
for PATCHFILE in "$PATCH_DIR"/*.patch; do
[ -f "$PATCHFILE" ] || continue

# Check if this patch should be skipped due to version constraints
if should_skip_patch "$PATCHFILE"; then
continue
fi

echo "Applying $PATCHFILE"
(cd "/opt/conda" && patch --strip=3 < "$PATCHFILE")
done
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- /opt/conda/lib/python3.12/site-packages/sparkmagic/livyclientlib/command.py
+++ /opt/conda/lib/python3.12/site-packages/sparkmagic/livyclientlib/command.py
@@ -54,6 +54,7 @@
try:
session.wait_for_idle()
data = {"code": self.code}
+ data["kind"] = session.kind
response = session.http_client.post_statement(session.id, data)
statement_id = response["id"]
output = self._get_statement_output(session, statement_id)

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--- /opt/conda/lib/python3.12/site-packages/sparkmagic/utils/utils.py
+++ /opt/conda/lib/python3.12/site-packages/sparkmagic/utils/utils.py
@@ -94,15 +94,7 @@


def get_sessions_info_html(info_sessions, current_session_id):
- html = (
- """<table>
-<tr><th>ID</th><th>YARN Application ID</th><th>Kind</th><th>State</th><th>Spark UI</th><th>Driver log</th><th>User</th><th>Current session?</th></tr>"""
- + "".join(
- [session.get_row_html(current_session_id) for session in info_sessions]
- )
- + "</table>"
- )
-
+ html = ""
return html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
--- /opt/conda/lib/python3.12/site-packages/hdijupyterutils/ipythondisplay.py
+++ /opt/conda/lib/python3.12/site-packages/hdijupyterutils/ipythondisplay.py
@@ -1,4 +1,4 @@
-from IPython.core.display import display, HTML
+from IPython.display import display, HTML
from IPython import get_ipython
import sys
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- /opt/conda/lib/python3.12/site-packages/botocore/data/endpoints.json
+++ /opt/conda/lib/python3.12/site-packages/botocore/data/endpoints.json
@@ -5404,6 +5404,9 @@
"ap-northeast-3" : {
"hostname" : "datazone.ap-northeast-3.api.aws"
},
+ "ap-south-1" : {
+ "hostname" : "datazone.ap-south-1.api.aws"
+ },
"ap-south-2" : {
"hostname" : "datazone.ap-south-2.api.aws"
},
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash
# this is to replace sagemaker unfied studio jupyter scheduler label from "Job" to "Scheudule" to align with overall experience
set -ex

BASE_PATH="/opt/conda/share/jupyter/labextensions/@jupyterlab/scheduler/static"

# Function to perform replacement
replace_string() {
local search="$1"
local replace="$2"
echo "Replacing '$search' with '$replace'..."
grep -l -i -r "$search" "$BASE_PATH" | xargs sed -i "s/$search/$replace/gI"
}

# List of replacements
replace_string "\"Schedule\"" "\" \""
replace_string "Create Job\"" "Create Schedule\""
replace_string "Job name\"" "Schedule name\""
replace_string "Run job with input folder\"" "Run schedule with input folder\""
replace_string "\"The scheduled job will have access to all files under" "\"The schedule will have access to all files under"
replace_string "Notebook Jobs\"" "Notebook Schedules\""
replace_string "Notebook Job Definitions\"" "Notebook Schedule Definitions\""
replace_string "job definitions" "schedule definitions"
replace_string "Create Notebook Job" "Create Notebook Schedule"
replace_string "notebook job definition" "notebook schedule definition"
replace_string "Job definition name" "Schedule definition name"
replace_string "Job Detail\"" "Schedule Detail\""
replace_string "Job ID\"" "Schedule ID\""
replace_string "Your job definition" "Your schedule definition"
replace_string "Your job" "Your schedule"
replace_string "Job Definition\"" "Schedule Definition\""
replace_string "Run Job\"" "Run Schedule\""
replace_string "Creating job" "Creating schedule"
replace_string "Reload Job\"" "Reload Schedule\""
replace_string "Delete Job\"" "Delete Schedule\""
replace_string "Download Job Files\"" "Download Schedule Files\""
replace_string "No notebook jobs associated with this job definition" "No notebook schedules associated with this schedule definition"
replace_string "Create Job from Schedule Definition\"" "Create Schedule from Schedule Definition\""
replace_string "Job definition ID\"" "Schedule definition ID\""
replace_string "Create a notebook job" "Create a notebook schedule"
replace_string "Stop Job\"" "Stop Schedule\""

echo "All replacements completed!"
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- /opt/conda/lib/python3.12/site-packages/sparkmagic/livyclientlib/command.py
+++ /opt/conda/lib/python3.12/site-packages/sparkmagic/livyclientlib/command.py
@@ -54,6 +54,7 @@
try:
session.wait_for_idle()
data = {"code": self.code}
+ data["kind"] = session.kind
response = session.http_client.post_statement(session.id, data)
statement_id = response["id"]
output = self._get_statement_output(session, statement_id)
Loading