Skip to content

Commit

Permalink
♻️ Removed blank line
Browse files Browse the repository at this point in the history
  • Loading branch information
judynah committed Dec 2, 2024
1 parent 9ecaeaf commit 6c61d2b
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 65 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,10 @@ profiles.yaml

# Rye
.rye/

#LAPP
data-platform-infra/

test.py

data/
86 changes: 43 additions & 43 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,64 +92,64 @@ USER ${USER}
### viadot-azure ###
####################

FROM base as viadot-azure
# FROM base as viadot-azure

ARG INSTALL_DATABRICKS=false
# ARG INSTALL_DATABRICKS=false

# Databricks source setup
RUN if [ "$INSTALL_DATABRICKS" = "true" ]; then \
apt-get update && \
apt-get install -y wget apt-transport-https && \
mkdir -p /etc/apt/keyrings && \
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | tee /etc/apt/keyrings/adoptium.asc && \
echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list && \
apt-get update && \
apt-get install -y temurin-11-jdk && \
find /usr/bin/java -type d -exec chmod 777 {} \; ; \
fi
# # Databricks source setup
# RUN if [ "$INSTALL_DATABRICKS" = "true" ]; then \
# apt-get update && \
# apt-get install -y wget apt-transport-https && \
# mkdir -p /etc/apt/keyrings && \
# wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | tee /etc/apt/keyrings/adoptium.asc && \
# echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list && \
# apt-get update && \
# apt-get install -y temurin-11-jdk && \
# find /usr/bin/java -type d -exec chmod 777 {} \; ; \
# fi

ENV SPARK_HOME /usr/local/lib/python3.10/site-packages/pyspark
# ENV SPARK_HOME /usr/local/lib/python3.10/site-packages/pyspark

ARG INSTALL_DATABRICKS=false
# ARG INSTALL_DATABRICKS=false

# Turn off package manager caches.
ENV PIP_NO_CACHE_DIR=${PIP_NO_CACHE_DIR}
ENV UV_NO_CACHE=${UV_NO_CACHE}
# # Turn off package manager caches.
# ENV PIP_NO_CACHE_DIR=${PIP_NO_CACHE_DIR}
# ENV UV_NO_CACHE=${UV_NO_CACHE}

RUN rye lock --reset --features azure --pyproject viadot/pyproject.toml
RUN sed '/-e/d' ./viadot/requirements.lock > ./viadot/requirements.txt
RUN pip install -r ./viadot/requirements.txt
# RUN rye lock --reset --features azure --pyproject viadot/pyproject.toml
# RUN sed '/-e/d' ./viadot/requirements.lock > ./viadot/requirements.txt
# RUN pip install -r ./viadot/requirements.txt

RUN if [ "$INSTALL_DATABRICKS" = "true" ]; then \
pip install ./viadot/.[databricks]; \
fi
# RUN if [ "$INSTALL_DATABRICKS" = "true" ]; then \
# pip install ./viadot/.[databricks]; \
# fi

# Dependecy install
RUN pip install ./viadot/.[azure]
# # Dependecy install
# RUN pip install ./viadot/.[azure]

# Cleanup.
RUN rm -rf ./viadot
# # Cleanup.
# RUN rm -rf ./viadot

USER ${USER}
# USER ${USER}


##################
### viadot-aws ###
##################
# ##################
# ### viadot-aws ###
# ##################

FROM base as viadot-aws
# FROM base as viadot-aws

# Turn off package manager caches.
ENV PIP_NO_CACHE_DIR=${PIP_NO_CACHE_DIR}
ENV UV_NO_CACHE=${UV_NO_CACHE}
# # Turn off package manager caches.
# ENV PIP_NO_CACHE_DIR=${PIP_NO_CACHE_DIR}
# ENV UV_NO_CACHE=${UV_NO_CACHE}

RUN rye lock --reset --features aws --pyproject viadot/pyproject.toml
RUN sed '/-e/d' ./viadot/requirements.lock > ./viadot/requirements.txt
RUN pip install -r ./viadot/requirements.txt
# RUN rye lock --reset --features aws --pyproject viadot/pyproject.toml
# RUN sed '/-e/d' ./viadot/requirements.lock > ./viadot/requirements.txt
# RUN pip install -r ./viadot/requirements.txt

RUN pip install ./viadot/.[aws]
# RUN pip install ./viadot/.[aws]

# Cleanup.
RUN rm -rf ./viadot
# # Cleanup.
# RUN rm -rf ./viadot

USER ${USER}
# USER ${USER}
42 changes: 21 additions & 21 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"

services:
viadot-lite:
image: ghcr.io/dyvenia/viadot/viadot-lite:latest
image: ghcr.io/dyvenia/viadot/viadot-lite:2.1.26
container_name: viadot-lite
volumes:
# - ${HOME}/.databricks-connect:/home/viadot/.databricks-connect
Expand All @@ -11,23 +11,23 @@ services:
shm_size: "4gb"
entrypoint: sh ./docker/entrypoint.sh
restart: "unless-stopped"
viadot-azure:
image: ghcr.io/dyvenia/viadot/viadot-azure:latest
container_name: viadot-azure
volumes:
# - ${HOME}/.databricks-connect:/home/viadot/.databricks-connect
# - ${HOME}/.config/viadot/config.yaml:/home/viadot/.config/viadot/config.yaml
- ../:/home/viadot
shm_size: "4gb"
entrypoint: sh ./docker/entrypoint.sh
restart: "unless-stopped"
viadot-aws:
image: ghcr.io/dyvenia/viadot/viadot-aws:latest
container_name: viadot-aws
volumes:
# - ${HOME}/.databricks-connect:/home/viadot/.databricks-connect
# - ${HOME}/.config/viadot/config.yaml:/home/viadot/.config/viadot/config.yaml
- ../:/home/viadot
shm_size: "4gb"
entrypoint: sh ./docker/entrypoint.sh
restart: "unless-stopped"
# viadot-azure:
# image: ghcr.io/dyvenia/viadot/viadot-azure:latest
# container_name: viadot-azure
# volumes:
# # - ${HOME}/.databricks-connect:/home/viadot/.databricks-connect
# # - ${HOME}/.config/viadot/config.yaml:/home/viadot/.config/viadot/config.yaml
# - ../:/home/viadot
# shm_size: "4gb"
# entrypoint: sh ./docker/entrypoint.sh
# restart: "unless-stopped"
# viadot-aws:
# image: ghcr.io/dyvenia/viadot/viadot-aws:latest
# container_name: viadot-aws
# volumes:
# # - ${HOME}/.databricks-connect:/home/viadot/.databricks-connect
# # - ${HOME}/.config/viadot/config.yaml:/home/viadot/.config/viadot/config.yaml
# - ../:/home/viadot
# shm_size: "4gb"
# entrypoint: sh ./docker/entrypoint.sh
# restart: "unless-stopped"
2 changes: 1 addition & 1 deletion src/viadot/orchestration/prefect/tasks/business_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ def business_core_to_df(
f"Successfully downloaded {nrows} rows and {ncols} columns of data to a DataFrame."
)

return df
return df

0 comments on commit 6c61d2b

Please sign in to comment.