-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from UBC-DSCI/feat-env
Feat: environment for development and reproducibility
- Loading branch information
Showing
5 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Publish Dockerfile on DockerHub | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'Dockerfile' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: '0' | ||
- name: Bump version and push tag | ||
uses: anothrNick/github-tag-action@1.33.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: true | ||
RELEASE_BRANCHES: main | ||
id: bump | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: ${{ steps.bump.outputs.new_tag }} | ||
release_name: ${{ steps.bump.outputs.new_tag }} | ||
body: | | ||
Changes in this Release | ||
- Rebuilt Docker image and published to DockerHub with new tag | ||
draft: false | ||
prerelease: false | ||
- name: Publish to Registry | ||
uses: elgohr/Publish-Docker-Github-Action@master | ||
with: | ||
name: ubcdsci/predict-airbnb # change this to your DockerHub username and repository | ||
username: ${{ secrets.DOCKER_USERNAME }} # you need to add your Docker username to this GitHub repo as a secret | ||
password: ${{ secrets.DOCKER_PASSWORD }} # you need to add your Docker password to this GitHub repo as a secret | ||
tags: "latest,${{ steps.bump.outputs.new_tag }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM ubcdsci/jupyterlab:v0.9.0 | ||
|
||
# Install R packages with specific versions from conda-forge | ||
# Packages and versions specified in environment.yml | ||
COPY environment.yml . | ||
RUN conda env update --file environment.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
# predict-airbnb-nightly-price | ||
# Predict Airbnb nightly price | ||
|
||
## Usage | ||
|
||
We use a Docker container image to make the computational environment for this project reproducible. | ||
To run Jupyter lab inside the `ubcdsci/predict-airbnb` Docker container: | ||
|
||
- in terminal, navigate to the root of this project repository | ||
- type the following in terminal: | ||
|
||
``` | ||
docker-compose up -d | ||
``` | ||
- once the container has launched, users need to copy the URL that looks like `http://127.0.0.1:8888/lab?token=d9704724bf0267d3d9262698ffbb88123633f8c8f4b1a305` into their web browser to access Jupyter Lab | ||
- when done working, type `docker-compose down` to remove the dangling container. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
services: | ||
airbnb-env: | ||
image: ubcdsci/predict-airbnb | ||
ports: | ||
- "8888:8888" | ||
volumes: | ||
- .:/opt/notebooks/predict-airbnb-nightly-price |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: base | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- r-cowplot=1.1.1 | ||
- r-devtools=2.4.3 | ||
- r-kknn=1.3.1 | ||
- r-scales=1.1.1 | ||
- r-testthat=3.1.2 | ||
- r-tidymodels=0.1.4 | ||
- r-tidyverse=1.3.1 | ||
- r-tinytex=0.37 | ||
- r-usethis=2.1.5 | ||
- unixodbc=2.3.9 |