square-agency-59624
11/25/2025, 5:02 PMimage_spec = fl.ImageSpec(
name="test",
registry=REGISTRY,
python_version="3.10",
requirements="requirements.txt",
apt_packages=["git"],
pip_extra_index_url=[
"<https://download.pytorch.org/whl/cu113>",
],
pip_extra_args="--index-strategy unsafe-best-match",
)ancient-wolf-19325
11/25/2025, 5:02 PMImageSpec will use a base image matching Python 3.10, install APT package git, copy and install Python dependencies from requirements.txt, and configure pip to use the specified extra index and pip arguments. The relevant lines will include:
- FROM ghcr.io/flyteorg/flytekit:py3.10-<version> (default base image for Python 3.10)
- RUN apt-get update && apt-get install --no-install-recommends -y git
- COPY requirements.txt /root/
- RUN pip install --requirement requirements_uv.txt --extra-index-url https://download.pytorch.org/whl/cu113 --index-strategy unsafe-best-match
- Additional environment variables and entrypoint setup as needed
This structure is confirmed by the ImageSpec documentation and default builder implementation. The actual Dockerfile content is auto-generated and may include more details, but these are the key lines relevant to your configuration.
Would you like to see a full example of the generated Dockerfile or more detail on how each parameter is translated?
Sources:
- ImageSpec documentation
- default_builder.py 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.