Skip to content

Commit

Permalink
Dockerfile update
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiemo Bang committed Jan 29, 2024
1 parent 2501e27 commit 89f79a7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ FROM mcr.microsoft.com/devcontainers/rust:1-1-bullseye
USER vscode
WORKDIR /home/vscode

# Install python dependencies including pip
# 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 && \
echo 'eval "$($HOME/.pyenv/bin/pyenv init -)"' >> ~/.bashrc

# Install setup python environment with optimized python
# Install & setup python environment
# 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 && \
Expand All @@ -23,7 +22,7 @@ RUN git clone https://github.com/hydro-project/cloud_oracle_precomputer.git

WORKDIR /home/vscode/cloud_oracle_precomputer

RUN git checkout dev
#RUN git checkout dev

# Install protobuf from Github
RUN sudo bash util/install_protobuf.sh
Expand All @@ -40,12 +39,17 @@ RUN $HOME/.pyenv/shims/pip install -e baselines && \
$HOME/.pyenv/shims/pip install -e proto_messages

WORKDIR /home/vscode
RUN sudo rm -rf cloud_oracle_precomputer
#RUN sudo rm -rf cloud_oracle_precomputer

# Install SkyPIE oracle
RUN git clone https://github.com/hydro-project/cloud_oracle_skypie.git
WORKDIR /home/vscode/cloud_oracle_skypie
RUN $HOME/.pyenv/shims/pip install -e .

WORKDIR /home/vscode
RUN sudo rm -rf cloud_oracle_skypie
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

0 comments on commit 89f79a7

Please sign in to comment.