Ausnahme gefangen: SSL certificate problem: certificate is not yet valid 📌 Boost Your ML Team’s Productivity with Container-Based Development in the Cloud

🏠 Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeiträge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden Überblick über die wichtigsten Aspekte der IT-Sicherheit in einer sich ständig verändernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch übersetzen, erst Englisch auswählen dann wieder Deutsch!

Google Android Playstore Download Button für Team IT Security



📚 Boost Your ML Team’s Productivity with Container-Based Development in the Cloud


💡 Newskategorie: AI Nachrichten
🔗 Quelle: towardsdatascience.com

A simple approach to run VS Code in a container, in the cloud

Earlier this year, I published 2 guides (here, and here) to hosting code-server on SageMaker. It shows how you can run VS Code on scalable cloud compute, and code from anywhere without worrying about local setup. All you need is an internet connection.

Image by author: created with Stable Diffusion

In this post, we will go a step further and show how to do container-based development in the cloud, to speed up your ML project delivery.

We will pull an example python 3.10 container image from Dockerhub, and develop in it with VS Code on SageMaker. You will need access to a SageMaker Notebook Instance to go through the example. A small one should be enough.

Why container-based development, in the cloud helps streamline your ML projects?

With container-based development, you write, execute, and test your ML code inside containers. It means that you can work with the same libraries and dependencies as your team members, making collaboration easier with consistent and highly reproducible development environments.

Another advantage is that you develop and test your code in an environment that can behave exactly like your production environment, helping move faster from 0 to 1 in your project.

Photo by Desola Lanre-Ologun on Unsplash

And hosting code-server on SageMaker provides minimal changes to a local development experience in VS Code, allowing you to code from anywhere, on scalable cloud compute.

“But I thought VS Code was Open Source”

Typically with VS Code, you would use the Dev Containers extension to do container-based development. However, you cannot use it with code-server, nor any other open source VS Code projects.

Photo by Cookie the Pom on Unsplash

While the core of VS Code is open source, the marketplace and many extensions published by Microsoft are not. And Microsoft prohibits the use of any non-Microsoft VS Code from accessing their marketplace. See Differences compared to VS Code for more details.

So how do we do container-based development with VS Code on SageMaker then?

VS Code in your container, hosted on SageMaker

So we cannot bring the container to the IDE due to Microsoft extension license issues. But what if we bring the IDE to the container? In fact, code-server is web-based and can truly run anywhere. The setup is very easy and you can do it in 3 steps:

Step 1: Add code-server to your existing Dockerfile

You can add code-server to your container with a single line of code. Here is an example for adding it to an a python 3.10 image from Dockerhub

Image by author: I use an existing Dockerfile in my Notebook Instance, with python:3.10

Add one line and this is it!

https://medium.com/media/d81b944433f45c241c2e0b2f5eda0676/href

Step 2: Build and launch the container image on the Notebook Instance

Launch a terminal via the Jupyter/Jupyterlab of your Notebook Instance:

Image by author: If you use Jupyter, the button should be on the top-right corner

You can now navigate to your Dockerfile folder, and build the container image locally with the following command:

# BUILD THE CONTAINER IMAGE LOCALLY
docker build -t ide-in-container:latest .

Once the image is built, you can run the container with the command to launch code-server:

# RUN CONTAINER WITH VS CODE IN IT
docker run --rm -it -p 8080:8080 ide-in-container:latest code-server --auth none --disable-telemetry --bind-addr 0.0.0.0:8080

We expose code-server to the instance through the default port 8080.

Image by author: You should see the following after running the docker command

Step 3: Access VS Code through the Notebook Instance Jupyter Proxy

Now, all you need is to copy your Notebook Instance URL, change it a bit, and past it into a new tab:

Images by author: On the left is my instance original URL. I replaced /tree with /proxy/8080/ and pasted it in a new browser tab.

The tab should now open VS Code:

Image by author: You can install the Python extension for VS Code and get to work in your ML project!

Notes

To further streamline your work, you can mount the local Notebook Instance volume, and point VS Code to your existing configuration (extensions, key bindings, settings). In the example Dockerfile, I point VS Code to the /home/SageMaker/vscode-config config folder, I already had on the instance. This is done using the XDG_DATA_HOME environment variable.

And here is how you can mount the Notebook Instance volume to the container:

# RUN THIS COMMAND IF YOU WANT TO MOUNT THE NOTEBOOK INSTANCE HOME/SAGEMAKER FOLDER
docker run --rm -it -p 8080:8080 -v /home/ec2-user/SageMaker/:/home/SageMaker ide-in-container:latest code-server --auth none --disable-telemetry --bind-addr 0.0.0.0:8080

To improve your collaboration, you can add this “environment Dockerfile” on your project team GitHub repo. in this way it will be versioned and everyone can work with the exact same dependencies, at any time.

Conclusion

Developing inside containers with cloud-based IDEs can help streamline your ML project and team collaboration by making it easy to run and test code in a consistent environment, and by allowing you to access that development environment from anywhere.

In this post, I have shared with you a simple approach for running VS Code in a container, hosted on Amazon SageMaker.

To go further, you can visit 5 Simple Steps to MLOps with GitHub Actions, MLflow, and SageMaker Pipelines and learn how your team can easily run an end-to-end MLOps project using GitHub Actions and SageMaker.


Boost Your ML Team’s Productivity with Container-Based Development in the Cloud was originally published in Towards Data Science on Medium, where people are continuing the conversation by highlighting and responding to this story.

...



📌 Boost .NET MAUI Development Productivity: 6 Powerful Features of .NET Meteor for VS Code in Windows, Mac & Linux


📈 28.8 Punkte

📌 Chronosphere platform updates boost engineering team productivity


📈 28.57 Punkte

📌 Can artificial intelligence boost your productivity and become your personal assistant?


📈 28.28 Punkte

📌 Unleash Your Productivity: Practical Tips to Boost Your Workflow


📈 28.28 Punkte

📌 Und Microsoft so: Cloud, Cloud, Cloud, Cloud, Cloud, Cloud, Cloud


📈 27.23 Punkte

📌 Microsoft Cloud App Security: This software can help you to manage shadow IT and boost productivity


📈 25.18 Punkte

📌 Use Albert Launcher On Linux To Boost Your Productivity


📈 24.79 Punkte

📌 Microsoft Teams just added two new apps to boost your productivity


📈 24.79 Punkte

📌 Vivaldi 2.7 Hopes to Boost Your Productivity, Improves Stability and Reliability


📈 24.79 Punkte

📌 Boost your productivity with these 5 reading apps, on sale now


📈 24.79 Punkte

📌 Boost your mobile productivity with more than $400 off this portable touchscreen monitor


📈 24.79 Punkte

📌 10 Most Important Tools to Boost Your Productivity as a Developer


📈 24.79 Punkte

📌 6 Project Management Tools To Boost Your Productivity


📈 24.79 Punkte

📌 How to use ChatGPT to boost your developer productivity


📈 24.79 Punkte

📌 Using an old Raspberry Pi to boost your productivity


📈 24.79 Punkte

📌 Boost your productivity when you win an Eero Pro mesh Wi-Fi system!


📈 24.79 Punkte

📌 [Girok] The most beautiful and powerful CLI scheduler to boost your productivity!


📈 24.79 Punkte

📌 Pop!_OS Keyboard Shortcuts to Boost your Productivity


📈 24.79 Punkte

📌 Boost your productivity with these 3 hidden Outlook features you never knew existed


📈 24.79 Punkte

📌 Pair your computer with this geeky controller for the ultimate productivity boost


📈 24.79 Punkte

📌 17 Essential Tools to Boost Your Productivity 🚀🔥


📈 24.79 Punkte

📌 Mastering WordPress CLI: A Comprehensive Guide to Boost Your Productivity


📈 24.79 Punkte

📌 Boost your productivity with this top-rated organization training


📈 24.79 Punkte

📌 Boost Your Productivity as a Developer with OpenAI's ChatGPT


📈 24.79 Punkte

📌 How Microsoft AI Can Boost Your Productivity and Creativity


📈 24.79 Punkte

📌 Boost Your Productivity with Shell Commands: A beginner's guide to creating aliases and functions


📈 24.79 Punkte

📌 Visual Studio Code Extensions to Boost Your Productivity in 2024


📈 24.79 Punkte

📌 Boost Your Productivity with ntfy.sh: The Ultimate Notification Tool for Command-Line Users


📈 24.79 Punkte











matomo