Hi All, I want to run a script using a custom doc...
# announcements
n
Hi All, I want to run a script using a custom docker image. I have created the docker container and placed it in the home directory in the flyte-sandbox Now when I run the script using : pyflyte run --remote --image fibo:1.1 fibanocci_example.py wf --n 8 I'm getting the error mentioned in 2nd image. Even the .py file is present in the same directory. Can anyone please provide any insight into why this might be happening ?
g
could you share your docker file?
n
Dockerfile
g
Updating the dockerfile to something like below can fix it.
Copy code
FROM python:latest
WORKDIR /root
ENV PYTHONPATH /root
ADD requirements.txt .
RUN pip install -r requirements.txt
ENV n=5
Basically, you don’t need to copy fibonacci_example into your dockerfile because flytekit upload
fibonacci_example.py
when you running
pyflyte run …
And you execute the workflow on the flyteconsole, flyte will 1. override you docker CMD to
pyflyte-fast-execute …
2. pyflyte will download the fibonacci_example.py to local disk first, and then run your script
fibonacci_example
173 Views