Skip to content

Commit

Permalink
add docker options
Browse files Browse the repository at this point in the history
  • Loading branch information
sebDtSci committed Aug 28, 2024
1 parent 0534c0f commit ee2817f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu20.04

# ENV TENSORFLOW_VERSION=2.10.0
# ENV TORCH_VERSION=1.13.0
# ENV TORCHVISION_VERSION=0.14.0

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3-pip \
python3-dev \
python3-setuptools \
python3-wheel \
git \
curl \
ca-certificates \
openssh-server \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir /var/run/sshd
RUN echo 'root:nopassword' | chpasswd
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
# SSH login fix. Otherwise user is kicked off after login
RUN sed -i 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' /etc/pam.d/sshd

WORKDIR /app

COPY . app/
# RUN pip install --no-cache-dir -r app/requirements.txt

EXPOSE 5000

CMD ["python", "main.py"]
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '3.8'
services:
chatbot:
build:
context: .
dockerfile: Dockerfile
ports:
- "5000:5000"
deploy:
replicas: 1
environment:
- NVIDIA_VISIBLE_DEVICES=all
runtime: nvidia

0 comments on commit ee2817f

Please sign in to comment.