Skip to content

Commit

Permalink
feat: Make repo mybinder.org compatible (microsoft#1487)
Browse files Browse the repository at this point in the history
* feat: Add binder configuration files

* fix: Fix references to new environment filename extension (yaml->yml)

* trim developer dockerfile

Co-authored-by: Puneet Pruthi <[email protected]>
  • Loading branch information
ppruthi and Puneet Pruthi authored Apr 25, 2022
1 parent 777c6c2 commit b4af035
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-publish-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: conda-incubator/[email protected]
with:
python-version: 3.8.8
environment-file: environment.yaml
environment-file: environment.yml
activate-environment: synapseml
- name: Publish Artifact
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-publish-websiteautodeployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
uses: conda-incubator/[email protected]
with:
python-version: 3.8.8
environment-file: environment.yaml
environment-file: environment.yml
activate-environment: synapseml
- name: Convert notebooks to markdowns
shell: bash -l {0}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-release-sonatype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
uses: conda-incubator/[email protected]
with:
python-version: 3.8.8
environment-file: environment.yaml
environment-file: environment.yml
activate-environment: synapseml
- name: publish python package to pypi
if: startsWith(steps.getGitTag.outputs.gittag, 'v')
Expand Down Expand Up @@ -95,4 +95,4 @@ jobs:
NEXUS-PW: ${{ steps.GetKeyVaultSecrets.outputs.nexus-pw }}
PGP-PRIVATE: ${{ steps.GetKeyVaultSecrets.outputs.pgp-private }}
PGP-PUBLIC: ${{ steps.GetKeyVaultSecrets.outputs.pgp-public }}
PGP-PW: ${{ steps.GetKeyVaultSecrets.outputs.pgp-pw }}
PGP-PW: ${{ steps.GetKeyVaultSecrets.outputs.pgp-pw }}
4 changes: 2 additions & 2 deletions .github/workflows/ci-test-synapsee2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: conda-incubator/[email protected]
with:
python-version: 3.8.8
environment-file: environment.yaml
environment-file: environment.yml
activate-environment: synapseml
- name: Publish Blob Artifacts
shell: bash -l {0}
Expand All @@ -63,4 +63,4 @@ jobs:
files: '**/test-reports/TEST-*.xml'
check_name: "SynapseE2E Test Results"
comment_title: "SynapseE2E Test Results"


4 changes: 2 additions & 2 deletions .github/workflows/ci-tests-databrickse2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: conda-incubator/[email protected]
with:
python-version: 3.8.8
environment-file: environment.yaml
environment-file: environment.yml
activate-environment: synapseml
- name: Publish Blob Artifacts
shell: bash -l {0}
Expand All @@ -63,4 +63,4 @@ jobs:
with:
files: '**/test-reports/TEST-*.xml'
check_name: "DatabricksE2E Test Results"
comment_title: "DatabricksE2E Test Results"
comment_title: "DatabricksE2E Test Results"
2 changes: 1 addition & 1 deletion .github/workflows/ci-tests-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: conda-incubator/[email protected]
with:
python-version: 3.8.8
environment-file: environment.yaml
environment-file: environment.yml
activate-environment: synapseml
- name: Install Pip Package
shell: bash -l {0}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-tests-r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: conda-incubator/[email protected]
with:
python-version: 3.8.8
environment-file: environment.yaml
environment-file: environment.yml
activate-environment: synapseml
- name: Download Spark
shell: bash -l {0}
Expand Down Expand Up @@ -72,4 +72,4 @@ jobs:
curl -s https://codecov.io/bash > .codecov
chmod +x .codecov
echo "Starting Codecov Upload"
./.codecov -t ${{ steps.GetKeyVaultSecrets.outputs.codecov-token }}
./.codecov -t ${{ steps.GetKeyVaultSecrets.outputs.codecov-token }}
4 changes: 2 additions & 2 deletions .github/workflows/ci-tests-websitesamples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: conda-incubator/[email protected]
with:
python-version: 3.8.8
environment-file: environment.yaml
environment-file: environment.yml
activate-environment: synapseml
- name: Test Website Samples
shell: bash -l {0}
Expand Down Expand Up @@ -71,4 +71,4 @@ jobs:
curl -s https://codecov.io/bash > .codecov
chmod +x .codecov
echo "Starting Codecov Upload"
./.codecov -t ${{ steps.GetKeyVaultSecrets.outputs.codecov-token }}
./.codecov -t ${{ steps.GetKeyVaultSecrets.outputs.codecov-token }}
3 changes: 3 additions & 0 deletions apt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
default-jre
default-jdk
openmpi-bin
File renamed without changes.
21 changes: 2 additions & 19 deletions pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,23 +203,6 @@ jobs:
repository: 'public/mmlspark/build-minimal'
command: 'push'
tags: $(version)
- task: Docker@2
displayName: Developer Image Build
inputs:
containerRegistry: 'mmlspark-mcr-connection-1'
repository: 'public/mmlspark/build-developer'
command: 'build'
buildContext: "."
Dockerfile: 'tools/docker/developer/Dockerfile'
tags: $(version)
arguments: --build-arg MMLSPARK_VERSION=$(version)
- task: Docker@2
displayName: Developer Image Push
inputs:
containerRegistry: 'mmlspark-mcr-connection-1'
repository: 'public/mmlspark/build-developer'
command: 'push'
tags: $(version)
- task: Docker@2
condition: startsWith(variables['gittag'], 'v')
displayName: Release Image Build
Expand Down Expand Up @@ -280,14 +263,14 @@ jobs:
displayName: Use cached Anaconda environment
condition: startsWith(variables['tag'], 'v')
inputs:
key: 'conda | "$(Agent.OS)" | environment.yaml'
key: 'conda | "$(Agent.OS)" | environment.yml'
restoreKeys: |
python | "$(Agent.OS)"
python
path: $(CONDA_CACHE_DIR)
cacheHitVar: CONDA_CACHE_RESTORED
- bash: |
conda env create -f environment.yaml -v -v -v
conda env create -f environment.yml -v -v -v
condition: and(startsWith(variables['tag'], 'v'), eq(variables.CONDA_CACHE_RESTORED, 'false'))
displayName: Create Anaconda environment
- task: AzureKeyVault@1
Expand Down
4 changes: 4 additions & 0 deletions postBuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

mkdir -p $HOME/.ipython/profile_default/startup
cp tools/docker/demo/init_notebook.py $HOME/.ipython/profile_default/startup/init_notebook.py
4 changes: 2 additions & 2 deletions project/CondaPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ object CondaPlugin extends AutoPlugin {
val hasEnv = Process("conda env list").lineStream.toList
.map(_.split("\\s+").head).contains(condaEnvName)
if (!hasEnv) {
runCmd(Seq("conda", "env", "create", "-f", "environment.yaml"))
runCmd(Seq("conda", "env", "create", "-f", "environment.yml"))
} else {
println("Found conda env " + condaEnvName)
}
Expand All @@ -41,4 +41,4 @@ object CondaPlugin extends AutoPlugin {
override def requires: Plugins = sbt.Plugins.empty

override lazy val projectSettings: Seq[Setting[_]] = Seq()
}
}
9 changes: 9 additions & 0 deletions start
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

export OPENMPI_VERSION="3.1.2"
export SPARK_VERSION="3.2.1"
export HADOOP_VERSION="2.7"
export MMLSPARK_VERSION="0.9.5"

echo "Beginning Spark Session..."
exec "$@"
4 changes: 2 additions & 2 deletions templates/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ steps:
- task: Cache@2
displayName: Use cached Anaconda environment
inputs:
key: 'conda | "$(Agent.OS)" | environment.yaml'
key: 'conda | "$(Agent.OS)" | environment.yml'
restoreKeys: |
python | "$(Agent.OS)"
python
path: $(CONDA_CACHE_DIR)
cacheHitVar: CONDA_CACHE_RESTORED
- bash: |
conda env create -f environment.yaml -v -v -v
conda env create -f environment.yml -v -v -v
displayName: Create Anaconda environment
condition: eq(variables.CONDA_CACHE_RESTORED, 'false')
43 changes: 0 additions & 43 deletions tools/docker/developer/Dockerfile

This file was deleted.

4 changes: 2 additions & 2 deletions website/docs/reference/developer-readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ description: SynapseML Development Setup
9) Prepare your Python Environment
- Install [Miniconda](https://docs.conda.io/en/latest/miniconda.html)
- Note: if you want to run conda commands from IntelliJ, you may need to select the option to add conda to PATH during installation.
- Activate the `synapseml` conda environment by running `conda env create -f environment.yaml` from the `synapseml` directory.
- Activate the `synapseml` conda environment by running `conda env create -f environment.yml` from the `synapseml` directory.

> NOTE
>
Expand Down Expand Up @@ -67,7 +67,7 @@ Generates documentation for scala sources

### `createCondaEnv`

Creates a conda environment `synapseml` from `environment.yaml` if it does not already exist.
Creates a conda environment `synapseml` from `environment.yml` if it does not already exist.
This env is used for python testing. **Activate this env before using python build commands.**

### `cleanCondaEnv`
Expand Down

0 comments on commit b4af035

Please sign in to comment.