Member-only story

Effortless ML Training in GCP: Create and Distribute Custom Python Distribution Package

Brez
3 min readFeb 2, 2025

Here is a step-by-step guide to creating a Python .tar.gz file for your ML code. This file can be uploaded to Google Cloud Platform (GCP) for custom ML training:

  1. Organize Your Code:
  • Create a new directory for your project, if you haven’t already.
  • Inside the project directory, organize your code into subdirectories as needed. A common structure might include subdirectories like src for source code and data for data files.
project_name/

├── src/
│ ├── __init__.py
│ ├── module1.py
│ ├── module2.py
│ └── ...

├── data/
│ ├── dataset1.csv
│ ├── dataset2.csv
│ └── ...

├── tests/
│ ├── __init__.py
│ ├── test_
module1.py
│ ├── test_module2.py
│ └── ...

├── docs/
│ └── ...

├── setup.py
├── MANIFEST.in (optional)
└── README.md

2. Create a setup.py Script:

  • Create a setup.py script at the root of your project directory.
  • This script should include metadata about your project and instructions for how to build and install it. Here’s a basic example:
from setuptools import find_packages
from setuptools import setup

setup(
name='irys-market-predictor',
version='0.1',
packages=find_packages()…

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Brez
Brez

Written by Brez

🚀 Tech Visionary, Full-Stack Innovator, & Cybersecurity Enthusiast | Redefining Insurance & FinTech with Disruptive, Cutting-Edge Solutions 💡

No responses yet

Write a response