-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Refactor] Rename flyin to flyteinteractive #2157
[Refactor] Rename flyin to flyteinteractive #2157
Conversation
Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line:
|
@ByronHsu can you help review this PR? Thank you. |
Resolves flyteorg/flyte#4792 Signed-off-by: Chi-Sheng Liu <[email protected]>
Resolves flyteorg/flyte#4792 Signed-off-by: Chi-Sheng Liu <[email protected]>
4da5a44
to
6ae3b9b
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2157 +/- ##
==========================================
+ Coverage 82.78% 85.80% +3.02%
==========================================
Files 313 313
Lines 23630 23630
Branches 3541 3541
==========================================
+ Hits 19561 20275 +714
+ Misses 3481 2744 -737
- Partials 588 611 +23 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Future-Outlier <[email protected]>
a97cf44
to
08df568
Compare
I use this Dockerfile to help test this. FROM python:3.10-slim-buster
MAINTAINER Flyte Team <[email protected]>
LABEL org.opencontainers.image.source https://github.com/flyteorg/flytekit
WORKDIR /root
ENV PYTHONPATH /root
ARG VERSION
ARG TARGETARCH
# 1. Update the necessary packages for flytekit
# 2. Install code-server
# 3. Download code-server extensions for Python and Jupyter via wget
# 4. Install flytekit and flytekit-flyin with no cache
# 5. Delete apt cache. Reference: https://gist.github.com/marvell/7c812736565928e602c4
# 6. Some packages will create config file under /home by default, so we need to make sure it's writable
# 7. Change the permission of /tmp, so that others can run command on it
RUN apt-get update \
&& apt-get install build-essential git wget -y \
&& mkdir -p /tmp/ \
&& mkdir -p /tmp/code-server \
&& wget --no-check-certificate -O /tmp/code-server/code-server-4.19.0-linux-${TARGETARCH}.tar.gz https://github.com/coder/code-server/releases/download/v4.19.0/code-server-4.19.0-linux-${TARGETARCH}.tar.gz \
&& tar -xzf /tmp/code-server/code-server-4.19.0-linux-${TARGETARCH}.tar.gz -C /tmp/code-server/ \
&& wget --no-check-certificate https://open-vsx.org/api/ms-python/python/2023.20.0/file/ms-python.python-2023.20.0.vsix -P /tmp/code-server \
&& wget --no-check-certificate https://open-vsx.org/api/ms-toolsai/jupyter/2023.9.100/file/ms-toolsai.jupyter-2023.9.100.vsix -P /tmp/code-server
RUN pip install flyteidl --pre \
&& pip install -U git+https://github.com/flyteorg/flytekit.git@a97cf443a95725740547af434e72fa2c78962e00 \
&& pip install -U git+https://github.com/flyteorg/flytekit.git@a97cf443a95725740547af434e72fa2c78962e00#subdirectory=plugins/flytekit-flyteinteractive \
&& apt-get clean autoclean \
&& apt-get autoremove --yes \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/ \
&& useradd -u 1000 flytekit \
&& chown -R flytekit:flytekit /tmp/code-server \
&& chown flytekit: /root \
&& chown flytekit: /home \
&& :
# Set the environment variable for code-server
ENV PATH="/tmp/code-server/code-server-4.19.0-linux-${TARGETARCH}/bin:${PATH}"
USER flytekit
# Install extensions using code-server
# Execution is performed here as code-server configuration depends on the USER setting
# If we install it as ROOT, the config will be stored in /root/.config/code-server/config.yaml
# Now, the config of code-server will be stored in /home/flytekit/.config/code-server/config.yaml
RUN code-server --install-extension /tmp/code-server/ms-python.python-2023.20.0.vsix \
&& code-server --install-extension /tmp/code-server/ms-toolsai.jupyter-2023.9.100.vsix |
python example from flytekit import ImageSpec, Secret, task, workflow
# from flytekitplugins.flyteinteractive import vscode, SendgridNotifier, SendgridConfig, SlackNotifier, SlackConfig
from flytekitplugins.flyteinteractive import (CODE_TOGETHER_EXTENSION, COPILOT_EXTENSION,
VIM_EXTENSION, VscodeConfig, vscode)
from flytekitplugins.flyteinteractive import (vscode, VscodeConfig)
@task(
)
@vscode(
config=config,
# max_idle_seconds=80,
# warning_seconds_before_termination=60,
# notifier=slack_notifier,
)
def t(a: int, b: int) -> int:
return a + b
@workflow
def wf(a: int = 5, b: int = 3) -> int:
out = t(a=a, b=b)
return out |
Congrats on merging your first pull request! 🎉 |
Tracking issue
flyteorg/flyte#4792
flyteorg/flyte#4284
Why are the changes needed?
Due to Linkedin's policy, the name
flyin
needs to be changed toflyteinteractive
.What changes were proposed in this pull request?
How was this patch tested?
Setup process
None
Screenshots
Check all the applicable boxes
Related PRs
Docs link