From 4dd95917c06627c4b0482bdf9cbfaa830a71fcfd Mon Sep 17 00:00:00 2001 From: Forrest McKee Date: Wed, 29 Nov 2023 15:10:53 -0600 Subject: [PATCH] Update dockerfile to copy source files into working directory. Update README for build instructions. --- README.md | 5 +++++ docker/Dockerfile | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7016899c..6a487ad7 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,11 @@ There is growing interest in ensuring that large language models (LLMs) align wi ## Getting Started We provide a Dockerfile in `docker/Dockerfile` that can be used to easily set up the environment needed to run all code in this repository. +To build the Docker container, navigate to the root directory of this repository and run the following command: +``` +docker build -t your-image-tag -f docker/Dockerfile . +``` + For your desired black box models, make sure you have the API key stored in `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, `PALM_API_KEY` respectively. For example, ``` export OPENAI_API_KEY=[YOUR_API_KEY_HERE] diff --git a/docker/Dockerfile b/docker/Dockerfile index 045686f7..5a9101ee 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -4,6 +4,9 @@ FROM pytorch/pytorch:latest # Set a working directory inside the container WORKDIR /project +# Copy the Python files and directories into the container's project directory +COPY . /project + # Install git RUN apt-get update && apt-get install -y git @@ -11,4 +14,4 @@ RUN pip3 install fschat==0.2.23 RUN pip3 install pandas seaborn matplotlib numpy datasets evaluate -RUN pip install anthropic google-generativeai openai \ No newline at end of file +RUN pip install anthropic google-generativeai openai