Comments (1)
π€
Hello @samhita-alla,
I'm Dosu, a friendly bot here to assist you with your questions, bugs, and help you on your journey to becoming a contributor while we wait for our human maintainers. I'm here to make your experience with the flyte repository as smooth as possible. Let's get started!
Sure, you can set the working directory when using image spec in Flyte. This can be done in your Dockerfile using the WORKDIR
directive. This sets the working directory for any RUN
, CMD
, ENTRYPOINT
, COPY
, and ADD
instructions that follow in the Dockerfile. If the WORKDIR
doesnβt exist, it will be created even if itβs not used in any subsequent Dockerfile instruction.
Here's an example of how you can modify your Dockerfile:
FROM --platform=${BUILDPLATFORM} golang:1.21.5-alpine3.18 as builder
# ... rest of your Dockerfile ...
# This will eventually move to centurylink/ca-certs:latest for minimum possible image size
FROM alpine:3.18
LABEL org.opencontainers.image.source https://github.com/flyteorg/flytepropeller
COPY --from=builder /artifacts /bin
RUN apk --update add ca-certificates
RUN addgroup -S flyte && adduser -S flyte -G flyte
USER flyte
WORKDIR /root
CMD ["flytepropeller"]
In this example, WORKDIR /root
sets the working directory to /root
for the CMD ["flytepropeller"]
instruction and any other instructions that follow.
Regarding how Flyte handles the working directory for different tasks and workflows, it provides a mechanism for tasks to access their inputs and outputs through specific paths. This is done through the DataLoadingConfig
message in the Container
and K8sPod
messages. The input_path
and output_path
fields specify the file system paths where the inputs and outputs for the task are located. When a task is executed, the inputs are loaded into the input_path
, and the task is expected to write its outputs to the output_path
.
Here is the relevant part of the proto file:
message DataLoadingConfig {
// Flag enables DataLoading Config. If this is not set, data loading will not be used!
bool enabled = 1;
// File system path (start at root). This folder will contain all the inputs exploded to a separate file.
string input_path = 2;
// File system path (start at root). This folder should contain all the outputs for the task as individual files and/or an error text file
string output_path = 3;
// In the inputs folder, there will be an additional summary/metadata file that contains references to all files or inlined primitive values.
LiteralMapFormat format = 4;
IOStrategy io_strategy = 5;
}
This mechanism allows tasks to be completely portable, using inputs and outputs only from the local file system without any reference to FlyteIDL. However, it's important to note that this feature is currently only supported on Kubernetes.
I hope this helps! If you have any other questions, feel free to ask.
Best,
Dosu
Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a π if this is helpful and π if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
from flyte.
Related Issues (20)
- [Housekeeping] Unify uses of boilerplate
- [BUG] Fix ArrayNode not reporting terminal state in TaskExecutionEvent
- [Core feature] Publish `Fyteidl` crate in crates.io HOT 2
- lack of documentation on http+json requests example HOT 4
- Add a securitySchemes to swagger.json
- [Core feature] --lables Option for pyflyte register HOT 1
- [Core feature] Refactor flytepropeller HOT 2
- [BUG] Infinite loop and memory growth in dynamic task. HOT 1
- [Core feature] Remove init container in ray because the latest kuberay already has init container HOT 4
- [BUG] Streak length metric reporting is broken HOT 1
- [BUG] ArrayNode - fatal error: concurrent map writes
- [Core feature] Allow sub workflows created by `admin-launcher` to run on a different flytepropeller shard HOT 3
- [Core feature] Handle job failure to fail faster and improve UX HOT 3
- [BUG] map_task downloads all pickled outputs from previous map_task HOT 3
- [Core feature] `limit-namespace` should be a `limit-namespaces` to accept list of namespaces HOT 2
- [BUG] Auth calls not hitting the single-binary
- Flyte Project isolation HOT 1
- Flytekit Go SDK HOT 2
- [Core feature] Flytekit Rust SDK HOT 1
- [BUG] Docs | Side menu truncated on reduced widths HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flyte.