orange-author-51398
06/28/2023, 9:06 AMfancy-plumber-70674
06/28/2023, 9:12 AMFROM <http://ghcr.io/flyteorg/flytekit:tag|ghcr.io/flyteorg/flytekit:tag> # whichever tag you want to build on
USER root
# Upgrade pip, git not needed if you don't want it
RUN apt-get -y install git && pip install --upgrade pip
# Install python packages
RUN pip install ........ \
.......
# If we want to install custom git packages we do something like this:
# RUN pip install git+<https://gitrepolinkhere>
USER flytekit
CMD [] # Not needed
This is a basic Dockerfile structure we use to build custom images
You can also use ImageSpec from 1.6.0 onwards I believe, but this is more explicit and manual
@orange-author-51398fancy-plumber-70674
06/28/2023, 9:12 AMfancy-plumber-70674
06/28/2023, 9:14 AMorange-author-51398
06/28/2023, 9:17 AMfancy-plumber-70674
06/28/2023, 9:21 AMCOPY
command for Docker to copy the modules from your local build path into the Docker container's working directory. By default it's /root or $HOME
So
If you want to use relative paths with "./"
COPY ./path/to/your/modules/on/local ./path/to/docker/container/directory
Or absolute paths in terms of PATH
COPY /absolute/path/here/on/local /absolute/path/inside/docker/container
fancy-plumber-70674
06/28/2023, 9:22 AMorange-author-51398
06/28/2023, 9:31 AMorange-author-51398
06/28/2023, 2:43 PM