Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
natolambert committed Aug 23, 2024
1 parent 25a93fa commit 76d41a6
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ on:
- 'Dockerfile'
- 'setup.py'
branches: [main]
pull_request: # note, comment this out for running on every push
# Also run on PRs that update the files in the image's directory (other than README).
branches: [main]
paths:
- 'rewardbench/**'
- 'scripts/**'
- 'Dockerfile'
- 'setup.py'
workflow_dispatch: # This allows us to manually trigger a build through the GitHub UI.
# pull_request: # note, comment this out for running on every push
# # Also run on PRs that update the files in the image's directory (other than README).
# branches: [main]
# paths:
# - 'rewardbench/**'
# - 'scripts/**'
# - 'Dockerfile'
# - 'setup.py'
# workflow_dispatch: # This allows us to manually trigger a build through the GitHub UI.

env:
DOCKER_BUILDKIT: "1"
Expand Down
38 changes: 38 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,44 @@ FROM --platform=linux/amd64 nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04

RUN apt update && apt install -y openjdk-8-jre-headless

ARG DEBIAN_FRONTEND="noninteractive"
ENV TZ="America/Los_Angeles"

# Install base tools.
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
jq \
language-pack-en \
make \
sudo \
unzip \
vim \
wget \
parallel \
iputils-ping \
tmux

# This ensures the dynamic linker (or NVIDIA's container runtime, I'm not sure)
# puts the right NVIDIA things in the right place (that THOR requires).
ENV NVIDIA_DRIVER_CAPABILITIES=graphics,utility,compute

# Install conda. We give anyone in the users group the ability to run
# conda commands and install packages in the base (default) environment.
# Things installed into the default environment won't persist, but we prefer
# convenience in this case and try to make sure the user is aware of this
# with a message that's printed when the session starts.
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py310_23.1.0-1-Linux-x86_64.sh \
&& echo "32d73e1bc33fda089d7cd9ef4c1be542616bd8e437d1f77afeeaf7afdb019787 Miniconda3-py310_23.1.0-1-Linux-x86_64.sh" \
| sha256sum --check \
&& bash Miniconda3-py310_23.1.0-1-Linux-x86_64.sh -b -p /opt/miniconda3 \
&& rm Miniconda3-py310_23.1.0-1-Linux-x86_64.sh

ENV PATH=/opt/miniconda3/bin:/opt/miniconda3/condabin:$PATH
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib:/usr/local/cuda/lib64:$LD_LIBRARY_PATH


# Ensure users can modify their container environment.
RUN echo '%users ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

Expand Down

0 comments on commit 76d41a6

Please sign in to comment.