From 782a9e29f9eaf006d75a26a01d4481c39dbe67be Mon Sep 17 00:00:00 2001 From: jarvis2324 Date: Sun, 23 Jul 2023 18:13:32 +0000 Subject: [PATCH] Added DockerFile --- Dockerfile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..5da3ebd6b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,34 @@ +# Use the official Python image as the base image +FROM nvidia/cuda:11.0.3-base-ubuntu20.04 + + +# Run update +RUN apt update + + +#Install Python + +RUN apt-get install -y python3 python3-pip + + +# Set the working directory inside the container +WORKDIR /app + + +# Copy the contents of the cloned GitHub repository to the working directory in the container +COPY ./ /app + +# Install Python dependencies +RUN pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118 xformers +RUN pip3 install -r requirements.txt + + +# Expose the port the application will be running on +EXPOSE 8188 + +# Set the environment variable for GPU support +ENV NVIDIA_VISIBLE_DEVICES all + +# Run the Python program when the container starts +CMD ["python3", "main.py", "--listen","0.0.0.0"] +