-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
55 lines (41 loc) · 1.72 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM mcr.microsoft.com/devcontainers/rust:1-1-bullseye
USER vscode
WORKDIR /home/vscode
# Install python environment manager
RUN curl https://pyenv.run | bash && \
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc && \
echo 'eval "$($HOME/.pyenv/bin/pyenv init -)"' >> ~/.bashrc
# Install & setup python environment
ENV PYTHON_CONFIGURE_OPTS='--enable-shared'
#ENV PYTHON_CONFIGURE_OPTS='--enable-optimizations --with-lto --enable-shared' PYTHON_CFLAGS='-march=native -mtune=native'
RUN $HOME/.pyenv/bin/pyenv install 3.9.16 && \
$HOME/.pyenv/bin/pyenv virtualenv 3.9.16 dev && \
$HOME/.pyenv/bin/pyenv global 3.9.16 && \
$HOME/.pyenv/shims/pip install pip --upgrade && \
$HOME/.pyenv/shims/pip install maturin
# Clone the skypie-precomputation repo
RUN git clone https://github.com/hydro-project/cloud_oracle_precomputer.git
WORKDIR $HOME/cloud_oracle_precomputer
#RUN git checkout dev
# Install protobuf from Github
RUN sudo bash util/install_protobuf.sh
# Install dependencies for cvxpy
RUN sudo apt-get update && \
sudo apt-get install -y libopenblas-dev cmake
# Install Python requirements
RUN $HOME/.pyenv/shims/pip install -r Requirements.txt
# Build and install the skypie-precomputation util packages
RUN $HOME/.pyenv/shims/pip install -e baselines && \
$HOME/.pyenv/shims/pip install -e proto_messages
WORKDIR $HOME
#RUN sudo rm -rf cloud_oracle_precomputer
# Install SkyPIE oracle
RUN git clone https://github.com/hydro-project/cloud_oracle_skypie.git
WORKDIR $HOME/cloud_oracle_skypie
RUN $HOME/.pyenv/shims/pip install -e .
WORKDIR $HOME
RUN sudo rm -rf cloud_oracle_skypie
# Warm up the cache for the Rust build
RUN cd cloud_oracle_precomputer && \
cargo build && \
cargo build --release