Skip to content

Commit 58bb927

Browse files
committed
Building MloPS + Data Science Scripts
1 parent d00525e commit 58bb927

File tree

26 files changed

+4088
-583
lines changed

26 files changed

+4088
-583
lines changed

.dbx/lock.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
{
2-
"context_id": "6505588973318184615"
1+
{
2+
"context_id": "6291623212386950857"
33
}

.dbx/project.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
{
2-
"environments": {
3-
"default": {
4-
"profile": "DEFAULT",
5-
"storage_type": "mlflow",
6-
"properties": {
7-
"workspace_directory": "/Shared/cicd_dbx_workflows",
8-
"artifact_location": "dbfs:/Shared/cicd_dbx_workflows"
9-
}
10-
},
11-
"ciaran_sandbox": {
12-
"profile": "ciaran_sandbox",
13-
"workspace_dir": "/Shared/ciaran_sandbox",
14-
"artifact_location": "dbfs:/Shared/cicd_workflows/ciaran_sandbox"
15-
}
16-
},
17-
"inplace_jinja_support": true,
18-
"failsafe_cluster_reuse_with_assets": false,
19-
"context_based_upload_for_execute": false
1+
{
2+
"environments": {
3+
"default": {
4+
"profile": "DEFAULT",
5+
"storage_type": "mlflow",
6+
"properties": {
7+
"workspace_directory": "/Shared/dbx/projects/dstoolkit-mlops-databricks",
8+
"artifact_location": "dbfs:/dbx/dstoolkit-mlops-databricks"
9+
}
10+
},
11+
"ciaran_sandbox": {
12+
"profile": "ciaran_sandbox",
13+
"workspace_dir": "/Shared/ciaran_sandbox",
14+
"artifact_location": "dbfs:/Shared/cicd_workflows/ciaran_sandbox"
15+
}
16+
},
17+
"inplace_jinja_support": true,
18+
"failsafe_cluster_reuse_with_assets": false,
19+
"context_based_upload_for_execute": false
2020
}

.devcontainer/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# https://github.com/microsoft/vscode-dev-containers/blob/main/containers/python-3/.devcontainer/Dockerfile
2+
3+
# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster
4+
5+
ARG VARIANT="3.10"
6+
FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT}
7+
8+
ARG DEV_DATABRICKS_TOKEN
9+
10+
COPY .databricks-connect.template /home/vscode/.databricks-connect
11+
12+
RUN && sudo apt update \
13+
&& sudo apt-get install -y default-jre \
14+
&& pip install databricks-connect \
15+
&& pip install -U pip \
16+
&& sed -i "s/replacetoken/${DEV_DATABRICKS_TOKEN}/g" /home/vscode/.databricks-connect
17+
18+
ENV SPARK_HOME /usr/local/lib/python3.10/site-packages/pyspark

.devcontainer/devcontainer.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Config options: https://aka.ms/devcontainer.json
2+
3+
// File example: https://github.com/microsoft/vscode-dev-containers/blob/main/containers/python-3/.devcontainer/devcontainer.json
4+
{
5+
6+
"name": "Python 3",
7+
"build": {
8+
"dockerfile": "Dockerfile",
9+
"context": "..",
10+
"args": {
11+
// Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6
12+
// Append -bullseye or -buster to pin to an OS version.
13+
// Use -bullseye variants on local on arm64/Apple Silicon.
14+
"VARIANT": "3.10-bullseye",
15+
"DEV_DATABRICKS_TOKEN": "${localEnv:DEV_DATABRICKS_TOKEN}"
16+
}
17+
},
18+
19+
// Configure tool-specific properties.
20+
"customizations": {
21+
// Configure properties specific to VS Code.
22+
"vscode": {
23+
// Set *default* container specific settings.json values on container create.
24+
"settings": {
25+
"python.defaultInterpreterPath": "/usr/local/bin/python",
26+
"python.linting.enabled": true,
27+
"python.linting.pylintEnabled": true,
28+
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
29+
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
30+
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
31+
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
32+
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
33+
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
34+
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
35+
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
36+
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
37+
},
38+
39+
// Add the IDs of extensions you want installed when the container is created.
40+
"extensions": ["ms-python.python", "ms-python.vscode-pylance"]
41+
}
42+
},
43+
44+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
45+
// "forwardPorts": [],
46+
47+
// Use 'postCreateCommand' to run commands after the container is created.
48+
// "postCreateCommand": "pip3 install --user -r requirements.txt",
49+
50+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
51+
"remoteUser": "vscode"
52+
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ dev.env
1313
data_science/src_nyc_taxi/build
1414
data_science/src_nyc_taxi/dist
1515
data_science/src_nyc_taxi/nyc_taxi_src.egg-info
16+
.linux_venv
17+
experiments
1618

1719

1820

=

74 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)