|
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 |
|
|
|
ENV DEBIAN_FRONTEND=noninteractive \ |
|
TZ=America/Los_Angeles \ |
|
HOST=0.0.0.0 \ |
|
PORT=7860 \ |
|
ORIGINS=* |
|
|
|
WORKDIR /code |
|
|
|
RUN chmod 777 . |
|
|
|
COPY ./requirements.txt /code/requirements.txt |
|
|
|
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt |
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
USER user |
|
|
|
RUN apt-get update && apt-get install -y \ |
|
git \ |
|
make build-essential libssl-dev zlib1g-dev \ |
|
libbz2-dev libreadline-dev wget curl llvm \ |
|
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev git-lfs \ |
|
ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx \ |
|
&& rm -rf /var/lib/apt/lists/* \ |
|
&& git lfs install |
|
|
|
|
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
|
|
WORKDIR $HOME/app |
|
|
|
COPY --chown=user . $HOME/app |
|
|
|
RUN chmod 777 . |
|
|
|
EXPOSE 7860 |
|
|
|
CMD ["python", "-m", "main"] |