Skip to content

Instantly share code, notes, and snippets.

@moss2k13
moss2k13 / jupyterlab-mlops:dev-4728c742faaacc79d6a0d0c696e9a97c987b0a4f.txt
Created October 1, 2024 09:01
gcr.io/getindata-images-public/jupyterlab-mlops:dev-4728c742faaacc79d6a0d0c696e9a97c987b0a4f
## https://github.com/getindata/jupyter-images/pull/65
## local spark and kedro verification
## [email protected]
docker run -it --network host --rm gcr.io/getindata-images-public/jupyterlab-mlops:dev-4728c742faaacc79d6a0d0c696e9a97c987b0a4f bash
Unable to find image 'gcr.io/getindata-images-public/jupyterlab-mlops:dev-4728c742faaacc79d6a0d0c696e9a97c987b0a4f' locally
dev-4728c742faaacc79d6a0d0c696e9a97c987b0a4f: Pulling from getindata-images-public/jupyterlab-mlops
Digest: sha256:311f27e69fc3f36a4fdcf5c3b2e03d8da93fb4cf50dd9a44e68551eed4ccc89c
Status: Downloaded newer image for gcr.io/getindata-images-public/jupyterlab-mlops:dev-4728c742faaacc79d6a0d0c696e9a97c987b0a4f
@moss2k13
moss2k13 / jupyterlab-mlops:python-3.11-d8af1be43a69c8c276152c5714e9f58b75f401c0.txt
Created September 12, 2024 15:38
getindata-images-public/jupyterlab-mlops:python-3.11-d8af1be43a69c8c276152c5714e9f58b75f401c0
docker run -it --rm --network host --name jupyterlab-mlops gcr.io/getindata-images-public/jupyterlab-mlops:python-3.11-d8af1be43a69c8c276152c5714e9f58b75f401c0 bash
(python3.11) jovyan@PF-3ASX5A:~$ conda env list
# conda environments:
#
base /opt/conda
python3.11 * /opt/conda/envs/python3.11
(python3.11) jovyan@PF-3ASX5A:~$ echo $PATH
/opt/conda/envs/python3.11/bin:/opt/conda/condabin:/opt/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
{
"eventVersion": "1.08",
"userIdentity": {
"type": "AssumedRole",
"principalId": "AROAQ5PTXMOKNYTYDEY4L:packerwithconditions",
"arn": "arn:aws:sts::063325037460:assumed-role/packer-test-role/packerwithconditions",
"accountId": "063325037460",
"accessKeyId": "ASIAQ5PTXMOKLK65ESJ5",
"sessionContext": {
"sessionIssuer": {
{
"eventVersion": "1.08",
"userIdentity": {
"type": "AssumedRole",
"principalId": "AROAQ5PTXMOKNYTYDEY4L:packerwithoutconditions",
"arn": "arn:aws:sts::063325037460:assumed-role/packer-test-role/packerwithoutconditions",
"accountId": "063325037460",
"accessKeyId": "ASIAQ5PTXMOKCFCEFF53",
"sessionContext": {
"sessionIssuer": {
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ec2:AttachVolume",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:DeregisterImage",
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::063325037460:user/temporary-user",
"Service": "ec2.amazonaws.com"
},
"Action": [
docker run -it --rm --name packer -v $(pwd):/workspace -w /workspace -e PACKER_LOG=1 -e AWS_ACCESS_KEY_ID=$(cat get-session-token | jq -r .Credentials.AccessKeyId) -e AWS_SECRET_ACCESS_KEY=$(cat get-session-token | jq -r .Credentials.SecretAccessKey) -e AWS_SESSION_TOKEN=$(cat get-session-token | jq -r .Credentials.SessionToken) -e AWS_REGION=eu-central-1 hashicorp/packer:1.8.5 build -var AmazonOsReleaseLabel=2.0.20221210.1 -var prefix=my-dev -var packerPath=/tmp/downloads -debug custom-emr-ami.json
2023/02/14 12:05:44 [INFO] Packer version: 1.8.5 [go1.18.9 linux amd64]
2023/02/14 12:05:44 [TRACE] discovering plugins in /bin
2023/02/14 12:05:44 [TRACE] discovering plugins in /root/.config/packer/plugins
2023/02/14 12:05:44 [TRACE] discovering plugins in .
2023/02/14 12:05:44 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2023/02/14 12:05:44 [INFO] PACKER_CONFIG env var set; attempting to open config file: /root/.packerconfig
2023/02/14 12:05:44 [WARN] Config file doesn't exist:
aws --profile temporary-user sts get-session-token &> get-session-token
docker run -it --rm --name packer -v $(pwd):/workspace -w /workspace -e PACKER_LOG=1 -e AWS_ACCESS_KEY_ID=$(cat get-session-token | jq -r .Credentials.AccessKeyId) -e AWS_SECRET_ACCESS_KEY=$(cat get-session-token | jq -r .Credentials.SecretAccessKey) -e AWS_SESSION_TOKEN=$(cat get-session-token | jq -r .Credentials.SessionToken) -e AWS_REGION=eu-central-1 hashicorp/packer:1.8.5 build -var AmazonOsReleaseLabel=2.0.20221210.1 -var prefix=my-dev -var packerPath=/tmp/downloads -debug custom-emr-ami.json
2023/02/14 11:54:45 [INFO] Packer version: 1.8.5 [go1.18.9 linux amd64]
2023/02/14 11:54:45 [TRACE] discovering plugins in /bin
2023/02/14 11:54:45 [TRACE] discovering plugins in /root/.config/packer/plugins
2023/02/14 11:54:45 [TRACE] discovering plugins in .
{
"builders": [
{
"name": "custom-emr-ami",
"type": "amazon-ebs",
"skip_region_validation": true,
"ami_name": "{{ user `build_name` }}{{ user `prefix` }}-build{{ user `build_number` }}",
"communicator": "ssh",
"instance_type": "t2.small",
"token": "{{ user `aws_session_token` }}",
{
"builders": [
{
"name": "custom-emr-ami",
"type": "amazon-ebs",
"skip_region_validation": true,
"ami_name": "{{ user `build_name` }}{{ user `prefix` }}-build{{ user `build_number` }}",
"communicator": "ssh",
"instance_type": "t2.small",
"token": "{{ user `aws_session_token` }}",