Does anyone have a working example of this sentenc...
# prefect-community
a
Does anyone have a working example of this sentence from the docs: “Package your scripts up into a true Python package. You will most likely need to use the 
COPY
 instruction to put your package into the image, and then the 
RUN
 instruction to install it.”
m
I just went through this myself. I have a directory of python files called
flows
that contains some custom Task subclasses. What I did was add a file called
flows/setup.py
based on this template https://github.com/pypa/sampleproject/blob/master/setup.py, and then in my dockerfile I run
COPY flows flows
and then
RUN python flows/setup.py install
The setup.py looks like this
Copy code
from setuptools import setup

setup(
    name='<some name>',
    version='1.0.0',
    description='Prefect flows for DBT',

    packages=["flows"],
    python_requires='>=3.7',
)
Since you aren't publishing the package it can be pretty basic