mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-21 02:19:59 +08:00
85dae55d2f
* website_fixes * fix iframe comment issue Co-authored-by: Ali <ali.abid@huggingface.co>
39 lines
1.1 KiB
Docker
39 lines
1.1 KiB
Docker
FROM python:3.8
|
|
|
|
RUN apt-get update --fix-missing
|
|
RUN apt-get --assume-yes install npm nginx libcairo2-dev pkg-config python3-dev
|
|
RUN pip install pandas matplotlib
|
|
RUN mkdir gradio
|
|
WORKDIR /gradio
|
|
COPY ./frontend ./frontend
|
|
RUN mkdir gradio
|
|
COPY ./gradio/version.txt ./gradio/version.txt
|
|
WORKDIR /gradio/frontend
|
|
RUN npm install
|
|
RUN npm run build
|
|
WORKDIR /gradio
|
|
COPY ./gradio ./gradio
|
|
COPY ./setup.py ./setup.py
|
|
COPY ./MANIFEST.in ./MANIFEST.in
|
|
RUN python setup.py install
|
|
WORKDIR /gradio
|
|
COPY ./website ./website
|
|
WORKDIR /gradio/website/homepage
|
|
RUN pip install -r requirements.txt
|
|
WORKDIR /gradio
|
|
COPY ./guides ./guides
|
|
COPY ./demo ./demo
|
|
WORKDIR /gradio/website/homepage
|
|
ARG COLAB_NOTEBOOK_LINKS
|
|
RUN echo $COLAB_NOTEBOOK_LINKS > generated/colab_links.json
|
|
RUN npm install
|
|
RUN npm run build
|
|
WORKDIR /usr/share/nginx/html
|
|
RUN rm -rf ./*
|
|
RUN mkdir ./gradio_static/
|
|
RUN cp -r /gradio/gradio/templates/frontend/. ./gradio_static/
|
|
RUN cp -r /gradio/website/homepage/dist/. ./
|
|
RUN cp /gradio/website/homepage/nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|