There's an inconsistency in how working directories are handled between development (runpodctl project dev) and production (runpodctl project deploy / runpodctl project build) environments, which forces developers to implement path resolution workarounds in their handlers.
Current Behavior
In Development:
Working directory is set to project root: /runpod-volume/{uuid}/dev/<project>
Project structure is maintained (e.g., src/ directory)
Files can be accessed using paths relative to project root
In Production:
Working directory is changed to the handler's directory: /runpod-volume/{uuid}/prod/<project>/src
Forces developers to use different path resolution for asset files that exist directly in the repo
Current Workaround
Developers must add path resolution code to their handlers, for example to load a model that is part of same repo as the worker:
import os
current_dir = os.path.dirname(os.path.abspath(file))
model_path = os.path.join(current_dir, "<model>.pth")
Expected Behavior
The working directory should be consistent between development and production environments. Either:
Always set working directory to project root
Provide environment variables for important paths
Document a clear convention for file locations and path resolution
Impact
Developers need to add unnecessary path resolution code
Risk of deployment failures due to path inconsistencies
Confusion when transitioning from development to production
There's an inconsistency in how working directories are handled between development (
runpodctl project dev
) and production (runpodctl project deploy
/runpodctl project build
) environments, which forces developers to implement path resolution workarounds in their handlers.Current Behavior
In Development:
/runpod-volume/{uuid}/dev/<project>
src/
directory)In Production:
/runpod-volume/{uuid}/prod/<project>/src
Current Workaround
Developers must add path resolution code to their handlers, for example to load a model that is part of same repo as the worker:
Expected Behavior
The working directory should be consistent between development and production environments. Either:
Impact