-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: Add Dockerfile #85
Conversation
Once the container is running, you can run a simulation using the `python` | ||
commands described above. For example: | ||
|
||
``` |
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.
```bash will enable synthax highlighting
`Gurobi` license file and another containing the necessary input files for the | ||
engine. | ||
|
||
``` |
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.
```bash will enable synthax highlighting
Docker daemon installed and running, navigate to the `REISE.jl` folder | ||
containing the `Dockerfile` and build the image: | ||
|
||
``` |
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.
```bash will enable synthax highlighting
Dockerfile
Outdated
WORKDIR /build/gurobi_installer | ||
|
||
RUN wget -q https://packages.gurobi.com/9.0/gurobi9.0.2_linux64.tar.gz | ||
RUN mkdir /usr/share/gurobi902 |
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.
Similarly, updating this to /usr/share/gurobi910
Dockerfile
Outdated
ENV GUROBI_HOME='/usr/share/gurobi902/linux64' | ||
ENV GRB_LICENSE_FILE='/usr/share/gurobi_license/gurobi.lic' | ||
ENV JULIA_PROJECT='/app' | ||
ENV PATH="$PATH:/usr/share/julia-1.4.2/bin" \ |
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.
Should there be a semicolon delimiter?
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.
I can't necessarily find any Docker documentation to validate this, but I can validate that these variables have been correctly assigned within the container:
# echo $JULIA_PROJECT
/app
# echo $PYTHONPATH
/app/pyreisejl:
# echo $GUROBI_HOME
/usr/share/gurobi902/linux64
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.
GUROBI_HOME should be /usr/share/gurobi910/linux64
?
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.
It's consistent with the version that this Dockerfile is using, but yes, I updated this as well when testing the new Gurobi and Julia versions!
Dockerfile
Outdated
RUN wget -q https://julialang-s3.julialang.org/bin/linux/x64/1.4/julia-1.4.2-linux-x86_64.tar.gz &&\ | ||
tar -xf julia-1.4.2-linux-x86_64.tar.gz -C /usr/share |
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.
We should also update to the latest Julia version (1.5.3).
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.
Done!
Everything builds correctly now using the new Both locally and in the containers, Gurobi (specifically
I was able to successfully run simulations in the Nov 24th Docker version (with Gurobi 9.0.2), but even that image results in the same error now. |
After pulling a new cloud license and using that, I am now able to run simulations again. Unfortunately, I am now seeing this error when trying to run Julia:
I've tried with both Julia 1.5.3 (the latest version released) and Julia 1.5.1 (matching the current installation on the compute server) and gotten the same error each time. I've even downloaded the files for a recent scenario (scenario 1682, currently running on the compute server) to see if the files I were using were too old, but still ran into the same issue. I am able to create the |
Which version of |
It looks like |
The version of MAT was already 0.8.0, and it turns out this issue is solved in 0.8.1. I updated the Manifest.toml file to reflect this new version, after updating MAT only a minor version to 0.8.1. As a side note, I did update all the packages in Julia while trying to figure out how to get this error to go away, and on initial testing it looks like everything works out, but I imagine we'll want to do more thorough testing. |
Good catch, I think I see the relevant change in the MAT.jl v0.8.0 -> v0.8.1 diff: JuliaIO/MAT.jl@v0.8.0...v0.8.1#diff-c5711165d185d17fd8e62efe7908aed494576d39bb7f01dae9ed2ff28a30d4beL331. As a side note, the version of MAT.jl that's currently installed and running successfully on the server is v0.9.2 (since I'm If you can run and extract a scenario successfully, I think that should be enough to say that this dockerfile and dependency specification is ready to ship. |
Please give this PR a more descriptive name and squash down some of these smaller commits, and confirm that this works to run and extract a scenario, then I will approve. |
refactor: combine Docker commands
Purpose
Create a Dockerfile with documentation to run the
REISE.jl
What is the code doing
There is now a
Dockerfile
that can be used to build an image and then run a container with abash
entrypoint to run a simulation within the container.Where to look
The
Dockerfile
contains the information needed to run the image, and commands to build and run the container with the necessary mounts are documented in theREADME
.Time estimate
10min