-
Notifications
You must be signed in to change notification settings - Fork 65
Codespace for tutorial based on Dockerfile #142
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
Merged
Merged
Changes from 16 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
e06d31b
Using gurobi/python base image
hariszaf 1206dd0
Init devcontainer for building codespace
hariszaf 77e9572
fix path to Dockerfile
hariszaf 92ce4d1
add files
hariszaf dc2ffd4
fixing highs for pyoptinterface
hariszaf 206f33b
sampling using Dockerfile-oriented codespace
hariszaf fef3b59
sampling suboptimal - change examples
hariszaf 5b3c157
copula dependencies for the codespace case
hariszaf 9112811
save format
hariszaf 6b23e67
updated notebook
hariszaf 5db4ca7
minor
hariszaf 69716bd
depdendencies for codespace notebook
hariszaf 72970cb
up and running
hariszaf 4829a8c
attempt to fix Dockerfile building from current branch
hariszaf 7c7f256
fix silly error
hariszaf a72917c
sampling with other than MMCS
hariszaf 2c3d6d6
rephrasing remember
hariszaf 303e57b
replace colab button with codespace
hariszaf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,18 @@ | ||
| { | ||
| "name": "Codespace for dingo tutorial", | ||
| "build": { | ||
| "dockerfile": "../Dockerfile", | ||
| "context": ".." | ||
| }, | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "ms-python.python", | ||
| "ms-toolsai.jupyter", | ||
| "james-yu.latex-workshop" | ||
| ] | ||
| } | ||
| }, | ||
| "features": {}, | ||
| "postCreateCommand": "bash .devcontainer/post_create.sh" | ||
| } |
This file contains hidden or 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,20 @@ | ||
| #!/bin/bash | ||
| set -e # stop on any error | ||
|
|
||
| apt-get update | ||
| apt-get install -y \ | ||
| libnss3 \ | ||
| libatk-bridge2.0-0 \ | ||
| libcups2 \ | ||
| libxcomposite1 \ | ||
| libxdamage1 \ | ||
| libxfixes3 \ | ||
| libxrandr2 \ | ||
| libgbm1 \ | ||
| libxkbcommon0 \ | ||
| libpango-1.0-0 \ | ||
| libcairo2 \ | ||
| libasound2 | ||
|
|
||
| pip install --upgrade nbformat kaleido | ||
| echo y | plotly_get_chrome |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -11,5 +11,4 @@ volestipy.egg-info | |
| .vscode | ||
| venv | ||
| lp_solve_5.5/ | ||
| .devcontainer/ | ||
| .github/dependabot.yml | ||
This file contains hidden or 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,52 @@ | ||
| # Use the Gurobi Docker image as a base | ||
| FROM gurobi/python | ||
|
|
||
| # Install any additional dependencies for dingo | ||
| RUN apt-get update && apt-get install -y \ | ||
| cmake \ | ||
| lp-solve \ | ||
| git \ | ||
| wget \ | ||
| vim \ | ||
| bzip2 \ | ||
| g++ \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Install dependencies | ||
| RUN apt-get update && apt-get install -y libsuitesparse-dev | ||
| RUN pip install sparseqr \ | ||
| Cython \ | ||
| cobra \ | ||
| kaleido | ||
|
|
||
| # Get PySQR | ||
| RUN apt-get install libsuitesparse-dev | ||
|
|
||
| # Install Python dependencies | ||
| RUN pip install matplotlib \ | ||
| plotly \ | ||
| networkx \ | ||
| pyoptinterface[highs] | ||
|
|
||
| # Get dingo | ||
| WORKDIR /workspaces/dingo | ||
| COPY . . | ||
|
|
||
| # Get submodules | ||
| RUN git submodule update --init | ||
|
|
||
| # Get lp-solve | ||
| RUN wget https://sourceforge.net/projects/lpsolve/files/lpsolve/5.5.2.11/lp_solve_5.5.2.11_source.tar.gz &&\ | ||
| tar xzvf lp_solve_5.5.2.11_source.tar.gz &&\ | ||
| rm lp_solve_5.5.2.11_source.tar.gz | ||
|
|
||
| # Get boost library | ||
| RUN wget -O boost_1_76_0.tar.bz2 https://archives.boost.io/release/1.76.0/source/boost_1_76_0.tar.bz2 &&\ | ||
| tar xjf boost_1_76_0.tar.bz2 &&\ | ||
| rm boost_1_76_0.tar.bz2 | ||
|
|
||
| # Set environmental variable gurobi license path | ||
| ENV GRB_LICENSE_FILE=/opt/gurobi/gurobi.lic | ||
|
|
||
| # Install dingo | ||
| RUN ["python", "setup.py", "install", "--user"] |
This file contains hidden or 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
This file contains hidden or 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
phrasing here need some check.