Azure Files
Mount Azure Files file system to access shared network storage directly from Valohai executions.
Overview
Azure Files provides managed SMB storage that you can mount in Valohai executions. Use Azure Files to:
Access large datasets without downloading
Share preprocessed data across multiple executions
Cache intermediate results on fast shared storage
Process data in place and save versioned outputs
⚠️ Important: Files in file share mounts are NOT versioned by Valohai. Always save final results to
/valohai/outputs/for reproducibility.
Prerequisites
Before mounting Azure Files storage in Valohai:
Existing Azure Files instance — Use an existing storage or create a new one in Azure
Network access — Make sure the Azure Files storage is accessible from your worker instances
Setup: Configure Azure Files Access
Step 1: Get the Azure Files storage information
Navigate to your Azure storage account that contains the file share
Under the Overview page for the file share, click on Connect and then navigate under the Linux tab.
Take note of the following values:
File share connection string, e.g.
//storage-account-name.file.core.windows.net/file-share-nameusername, should match the storage account namepassword
Step 2: Store the file share information as environment variables
In Valohai, navigate to projects Settings → Environment Variables
Add the connection string,
usernameandpasswordas environment variables. Make sure to mark at least thepasswordas a secret!
Mount Azure Files file share in Execution
Mount Configuration
valohai.yaml:
Parameters:
destination— Mount point inside container (e.g.,/mnt/fileshare-data)source— File share connection string (format://storage-account-name.file.core.windows.net/file-share-name), passed here from theFILE_SHAREenvironment variabletype— Depends on your file share type, eithersmborcifsusername— Username for the file share, passed here from theUSERNAMEenvironment variablepassword— Password for the file share, passed here from thePASSWORDenvironment variablereadonly—true(recommended) orfalse
You can hardcode the connection string, username and password but especially for the latter tha is not recommended for security reasons.
Complete Workflow Example
Mount → Process → Save Pattern
Scenario: Process large video dataset stored on file share, extract features, save to Valohai outputs.
valohai.yaml:
extract_features.py:
Result:
✅ Raw videos accessed from file share (no download time for 100GB+ videos)
✅ Extracted features saved to
/valohai/outputs/(versioned)✅ Dataset created for reproducible model training
✅ Can train on
dataset://video-features/batch-001anytime
Best Practices
Use Readonly for Input Data
Always Version Final Results
Organize Your File Share Structure
Clear organization makes mounting and access control easier.
Handle Mount Errors
Maintaining Reproducibility
⚠️ Critical: Azure Files file share data can change between executions. Always save processed results to
/valohai/outputs/for versioning.
The problem:
The solution:
See: Access Network Storage for complete patterns.
Related Pages
Access Network Storage — Overview and when to use NFS
AWS Elastic File System — AWS equivalent
Google Cloud Filestore — GCP equivalent
On-Premises NFS — Mount on-prem storage
Load Data in Jobs — Alternative: Valohai's versioned inputs
Next Steps
Set up Azure Files file share in your Azure resource group (or use existing)
Get file share information for connecting to it
Create test execution mounting the file share
Build pipeline: mount → process → save to outputs
Monitor file share performance in Azure console
Last updated
Was this helpful?
