docker run
docker-compose.yml
Now that you can build container images for your ML environments, we address a practical necessity: managing data. Machine Learning applications need access to datasets for training and require ways to store the resulting models. Since containers are typically ephemeral, handling this persistent data requires specific techniques.
This chapter introduces methods for connecting your containers to data. We will examine Docker volumes for managing persistent storage, bind mounts useful during development, and strategies for interacting with cloud storage services. You'll also learn about the different ways to handle model artifacts, comparing approaches like including them in images versus loading them dynamically. By the end, you'll understand how to select and implement appropriate data management strategies for your containerized ML projects.
3.1 Understanding Container Storage
3.2 Using Bind Mounts for Development
3.3 Using Docker Volumes for Persistence
3.4 Comparing Bind Mounts and Volumes
3.5 Accessing Cloud Storage from Containers
3.6 Packaging Models Inside Images vs. Volumes
3.7 Hands-on practical: Mounting Datasets and Saving Models
© 2025 ApX Machine Learning