-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
ARG TAG_FOR_BASE_SAGEMAKER_IMAGE=1.5.2-cpu | ||
FROM --platform=linux/amd64 public.ecr.aws/sagemaker/sagemaker-distribution:$TAG_FOR_BASE_SAGEMAKER_IMAGE | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install docker-cli | ||
COPY docker-cli-install.sh ./ | ||
RUN ./docker-cli-install.sh | ||
|
||
# for OpenCV | ||
RUN sudo apt-get update && \ | ||
sudo apt-get install -y libopencv-dev && \ | ||
sudo rm -rf /var/lib/apt/lists/* | ||
|
||
# Install poetry to base python | ||
RUN conda run -n base python -m pip install poetry==1.8.2 | ||
|
||
# Add kernel - Python 3.11 | ||
RUN conda create --yes -n py311 python=3.11.8 ipykernel pytorch torchvision -c pytorch && \ | ||
conda run -n py311 python -m pip install poetry==1.8.2 && \ | ||
conda run -n py311 python -m ipykernel install --prefix /opt/conda --name "python3.11" --display-name "Python 3.11 (Anaconda)" | ||
|
||
# Add kernel - Python 3.12 | ||
RUN conda create --yes -n py312 python=3.12.2 ipykernel pytorch torchvision -c pytorch && \ | ||
conda run -n py311 python -m pip install poetry==1.8.2 && \ | ||
conda run -n py312 python -m ipykernel install --prefix /opt/conda --name "python3.12" --display-name "Python 3.12 (Anaconda)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# https://github.com/aws-samples/amazon-sagemaker-local-mode/blob/main/sagemaker_studio_docker_cli_install/sagemaker-distribution-docker-cli-install.sh | ||
|
||
sudo apt-get -y install ca-certificates curl gnupg | ||
|
||
sudo install -m 0755 -d /etc/apt/keyrings | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | ||
sudo chmod a+r /etc/apt/keyrings/docker.gpg | ||
echo \ | ||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ | ||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ | ||
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
sudo apt-get -y update | ||
|
||
# pick the latest patch from: | ||
# apt-cache madison docker-ce | awk '{ print $3 }' | grep -i 20.10 | ||
VERSION_STRING=5:20.10.24~3-0~ubuntu-jammy | ||
sudo apt-get install docker-ce-cli=$VERSION_STRING docker-compose-plugin -y |