|
|
@ -1,4 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
# Use an official NVIDIA CUDA runtime as a parent image
|
|
|
|
# Use an official NVIDIA CUDA runtime as a parent image
|
|
|
|
FROM python:3.10-slim-buster
|
|
|
|
FROM python:3.10-slim-buster
|
|
|
|
|
|
|
|
|
|
|
@ -8,12 +7,17 @@ WORKDIR /app
|
|
|
|
# Add the current directory contents into the container at /app
|
|
|
|
# Add the current directory contents into the container at /app
|
|
|
|
ADD . /app
|
|
|
|
ADD . /app
|
|
|
|
|
|
|
|
|
|
|
|
RUN apt update && apt install -y
|
|
|
|
# Install Python, libgl1-mesa-glx and other dependencies
|
|
|
|
|
|
|
|
|
|
|
|
# Install Python and other dependencies
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
python3-pip \
|
|
|
|
python3-pip \
|
|
|
|
pip3 install --upgrade pip
|
|
|
|
libgl1-mesa-glx \
|
|
|
|
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Upgrade pip
|
|
|
|
|
|
|
|
RUN pip3 install --upgrade pip
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Install nltk
|
|
|
|
|
|
|
|
RUN pip install nltk
|
|
|
|
|
|
|
|
|
|
|
|
# Install any needed packages specified in requirements.txt
|
|
|
|
# Install any needed packages specified in requirements.txt
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt supervisor
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt supervisor
|
|
|
@ -22,14 +26,13 @@ RUN pip install --no-cache-dir -r requirements.txt supervisor
|
|
|
|
RUN mkdir -p /etc/supervisor/conf.d && \
|
|
|
|
RUN mkdir -p /etc/supervisor/conf.d && \
|
|
|
|
echo "[supervisord] \n\
|
|
|
|
echo "[supervisord] \n\
|
|
|
|
nodaemon=true \n\
|
|
|
|
nodaemon=true \n\
|
|
|
|
[program:host_local_tools] \n\
|
|
|
|
|
|
|
|
command=python3 host_local_tools.py \n\
|
|
|
|
|
|
|
|
[program:web_demo] \n\
|
|
|
|
[program:web_demo] \n\
|
|
|
|
command=python3 web_demo.py \n\
|
|
|
|
command=python3 web_demo.py \n\
|
|
|
|
|
|
|
|
[program:host_local_tools] \n\
|
|
|
|
|
|
|
|
command=python3 host_local_tools.py \n\
|
|
|
|
" > /etc/supervisor/conf.d/supervisord.conf
|
|
|
|
" > /etc/supervisor/conf.d/supervisord.conf
|
|
|
|
|
|
|
|
|
|
|
|
# Make port 80 available to the world outside this container
|
|
|
|
# Make port 80 available to the world outside this container
|
|
|
|
EXPOSE 80
|
|
|
|
EXPOSE 80
|
|
|
|
|
|
|
|
|
|
|
|
# Run supervisord when the container launches
|
|
|
|
# Run supervisord when the container launches
|
|
|
|
CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
|
|
|
CMD ["/usr/local/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf", "--port", "7860"]
|
|
|
|