CoolFace
Apppublic

OpenDILabCommunity/DI-sheep

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
7likes
Dockerfile68 linesDownload Raw Back to root
1FROM pytorch/pytorch:1.12.1-cuda11.3-cudnn8-runtime as base2 3ENV DEBIAN_FRONTEND=noninteractive4ENV LANG        en_US.UTF-85ENV LANGUAGE    en_US:UTF-86ENV LC_ALL      en_US.UTF-87 8RUN apt update -y \9    && apt install libgl1-mesa-glx libglib2.0-0 libsm6 libxext6 libxrender-dev swig curl git vim gcc \g++ make wget locales dnsutils zip unzip cmake nginx -y \10    && curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \11    && apt-get install -y nodejs \12    && npm install -g npm@9.6.5 \13    && npm install -g create-react-app \14    && npm install typescript -g \15    && npm install -g vite \16    && apt clean \17    && rm -rf /var/cache/apt/* \18    && sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \19    && locale-gen20 21ADD nginx.conf /etc/nginx/nginx.conf22 23# Set up a new user named "user" with user ID 100024RUN useradd -m -u 1000 user25 26RUN mkdir -p /var/cache/nginx \27             /var/log/nginx \28             /var/lib/nginx29RUN touch /var/run/nginx.pid30RUN touch /run/nginx.pid31 32RUN chown -R user:user /var/cache/nginx \33                       /var/log/nginx \34                       /var/lib/nginx \35                       /var/run/nginx.pid \36                       /run/nginx.pid37 38# Switch to the "user" user39USER user40 41# Set home to the user's home directory42ENV HOME=/home/user \43    PATH=/home/user/.local/bin:$PATH44 45WORKDIR $HOME/workspace46 47ADD --chown=user DI-sheep DI-sheep48ADD --chown=user run.sh run.sh49 50RUN python3 -m pip install --upgrade pip \51    && python3 -m pip install --no-cache-dir DI-engine \52    && python3 -m pip install --no-cache-dir -r ./DI-sheep/service/requirement.txt53    54 55RUN cd ./DI-sheep/ui/ \56    && npm install react react-dom @types/react @types/react-dom \57    && npm audit fix \58    && npm run build59 60RUN cd $HOME/workspace \61    && chmod 777 run.sh62 63EXPOSE 417364EXPOSE 500065EXPOSE 500266 67CMD sh ./run.sh68