Skip to content

Commit

Permalink
Merge pull request #776 from cybercongress/v4_dockerfile_updates
Browse files Browse the repository at this point in the history
update dockerfile for v4, remove genesis and cyberfrey from build
  • Loading branch information
cyborgshead authored Sep 30, 2024
2 parents 23359d6 + 20271cf commit 0f6c8cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
28 changes: 9 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
###########################################################################################
FROM ubuntu:20.04

ENV GO_VERSION '1.19.13'
ENV GO_VERSION '1.22.2'
ENV GO_ARCH 'linux-amd64'
ENV GO_BIN_SHA '4643d4c29c55f53fa0349367d7f1bb5ca554ea6ef528c146825b0f8464e2e668'
ENV GO_BIN_SHA '5901c52b7a78002aeff14a21f93e0f064f74ce1360fce51c6ee68cd471216a17'
ENV DEBIAN_FRONTEND=noninteractive
ENV DAEMON_HOME /root/.cyber
ENV DAEMON_RESTART_AFTER_UPGRADE=true
Expand Down Expand Up @@ -48,35 +48,25 @@ RUN apt-get update && apt-get -y install --no-install-recommends \
&& add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" \
&& apt-get update \
&& apt-get install cuda=${CUDA_VER} -y --no-install-recommends \
&& mkdir -p /cyber/cosmovisor/genesis/bin \
&& mkdir -p /cyber/cosmovisor/upgrades/cyberfrey/bin \
&& mkdir -p /cyber/cosmovisor/upgrades/v3/bin \
# Compile cyber for genesis version
###########################################################################################
&& git checkout v0.2.0 \
&& cd /sources/x/rank/cuda \
&& make build \
&& cd /sources \
&& make build CUDA_ENABLED=true \
&& cp ./build/cyber /cyber/cosmovisor/genesis/bin/ \
&& rm -rf ./build \
# Compile cyber for cyberfrey version
&& mkdir -p /cyber/cosmovisor/upgrades/v4/bin \
# Compile cyber for v3 version
###########################################################################################
&& git checkout v2.0.0 \
&& git checkout v3.0.1 \
&& cd /sources/x/rank/cuda \
&& make build \
&& cd /sources \
&& make build CUDA_ENABLED=true \
&& cp ./build/cyber /cyber/cosmovisor/upgrades/cyberfrey/bin/ \
&& cp ./build/cyber /cyber/cosmovisor/upgrades/v3/bin/ \
&& rm -rf ./build \
# Compile cyber for v3 version
# Compile cyber for v4 version
###########################################################################################
&& git checkout v3.0.0 \
&& git checkout v4.0.0 \
&& cd /sources/x/rank/cuda \
&& make build \
&& cd /sources \
&& make build CUDA_ENABLED=true \
&& cp ./build/cyber /cyber/cosmovisor/upgrades/v3/bin/ \
&& cp ./build/cyber /cyber/cosmovisor/upgrades/v4/bin/ \
&& rm -rf ./build \
# Cleanup
###########################################################################################
Expand Down
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ then
cp -r /cyber/cosmovisor/upgrades /root/.cyber/cosmovisor/
fi

if [ -f "/root/.cyber/cosmovisor/genesis/bin/cyber" ]
if [ ! -d "/root/.cyber/cosmovisor/upgrades/v4/" ]
then
cp /cyber/cosmovisor/genesis/bin/cyber /root/.cyber/cosmovisor/genesis/bin/cyber
cp -r /cyber/cosmovisor/upgrades/v4 /root/.cyber/cosmovisor/upgrades/v4
fi

if [ ! -f "/root/.cyber/config/genesis.json" ]
Expand Down

0 comments on commit 0f6c8cf

Please sign in to comment.