From 325394fb95ffa7268086a1662923376eac58d84b Mon Sep 17 00:00:00 2001 From: Ripunjay Singh <81869464+rpj09@users.noreply.github.com> Date: Thu, 16 Mar 2023 19:01:03 +0530 Subject: [PATCH 1/2] Create Dockerfile --- Dockerfile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e3f4a1a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,35 @@ +# Base image +FROM ubuntu:20.04 + +# Set working directory +WORKDIR /app + +# Update and install required packages +RUN apt-get update && \ + apt-get install -y git-lfs wget && \ + rm -rf /var/lib/apt/lists/* + +# Download and install Miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ + bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda && \ + rm Miniconda3-latest-Linux-x86_64.sh + +# Set conda to automatically activate base environment on login +RUN echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ + echo "conda activate base" >> ~/.bashrc + +# Create OpenChatKit environment +COPY environment.yml . +RUN conda env create -f environment.yml + +# Install Git LFS +RUN git lfs install + +# Copy OpenChatKit code +COPY . . + +# Prepare GPT-NeoX-20B model +RUN python pretrained/GPT-NeoX-20B/prepare.py + +# Set entrypoint to bash shell +ENTRYPOINT ["/bin/bash"] From 021ee4a549ac7b6b7fd463f2d191377f8ac6e855 Mon Sep 17 00:00:00 2001 From: Ripunjay Singh <81869464+rpj09@users.noreply.github.com> Date: Thu, 16 Mar 2023 19:14:16 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 4b4068f..5affe84 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,23 @@ This repo also uses [Git LFS](https://git-lfs.com/) to manage some files. Instal ```shell git lfs install ``` +### If you want to run the pacakge using Docker: + +Build the Docker image using the following command: +```shell +docker build -t openchatkit . +``` +Run the Docker container using the following command: +```shell +docker run -it openchatkit +``` +This will start a new bash shell in the container. +Activate the OpenChatKit environment by running the following command: +```shell +conda activate OpenChatKit +``` + + # Pre-trained Weights