In order to build Docker images for Lambda functions with CDK on ARM or other non-Intel platforms, but want the Lambda to be on an x8664 platform, use the platform parameter…
Posts for: #Docker
Docker Run Issues - Unable to Start Container
Sometimes you won’t be able to run a Docker container because some .so file can’t be found. This is how to fix it:
Running a Jupyter Notebook From a Docker Container Running on EC2
Given a Dockerfile on an EC2 instance that has, at the very least, these commands at the end: EXPOSE 8888 ENTRYPOINT ["/bin/bash"]
Working Within a Running Docker Container
First, build your image (assuming your Dockerfile is in the current directory): docker build -t myimg .
Using Bind Mounts to Speed Up Docker Development
When using docker run, the –mount parameter allows you to specify a directory to recreate within the Docker container so that you can edit your code locally and then run it…
Remote Development with VS Code
To use Docker for developing in VS Code, you can use the Docker, Dev Containers and Remote Explorer extensions. Here’s a rough step-by-step guide: 1. Build an image if it…
Invalid Cross-Device Link when Deploying with CDK
When deploying with CDK, I started out of nowhere getting this error: OSError: [Errno 18] Invalid cross-device link: ‘/tmp/pip-target-e4qns87/lib/python/numpy’ ->…
Logging from Custom Docker Code in Sagemaker
Unlike in AWS Lambda code, in Sagemaker training jobs using custom Python code in Docker containers logging won’t work unless a stream handler is specifically added to the logger.
SAGEMAKER_PROGRAM in Custom Dockerfile
At the end of a Dockerfile that defines a container for a Sagemaker training job, you have to define the SAGEMAKERPROGRAM environment variable. It needs to point directly to…
Deploying an Updated Image to Lambda Function
Redeploying a CDK stack with a Lambda function that relies on a Docker image in ECR won’t necessarily update the function with a newly pushed image. Instead, use the Lambda…