The data is acquired from HuggingFace imagenet-1k (needs login).
This project needs some available space of at least:
| Size (GB) | |
|---|---|
| Raw data | 333.3 |
| Transformed data | 1125.5 |
| Total | 1458.8 |
From the root of this project, run:
python etl/extract.pypython etl/transform.py
The local folder dataset should have the following structure:
dataset
└── imagenet_1k_256x256_float32.h5-
Run
python -m venv .venv -
Activate the virtual environment with
source .venv/bin/activate -
Install pip dependencies
pip install -r requirements.txt -
Start a local MLflow server inside a container:
podman run -d -p 5000:5000 -v ./mlruns:/mlflow/mlruns ghcr.io/mlflow/mlflow mlflow server --backend-store-uri /mlflow/mlruns --default-artifact-root /mlflow/mlruns --host 0.0.0.0
-
Run
python src/main.pyto train the model
- Build the image:
podman build -t alex-net:local . - Example of run command (Adjust to your GPU config):
podman run \ -v "YOUR_DATASET_DIR":/app/dataset \ -e DATASET_FILE_DIR="/app/dataset/imagenet_1k_256x256_float32.h5" \ --device nvidia.com/gpu=all \ --shm-size=512m \ alex-net:local
When changing the dependencies of pip:
- Run:
pip freeze > requirements.txt