Spaces:
Runtime error
Runtime error
Improvements to Docker image
Browse files- Dockerfile +3 -4
- README.rst +2 -6
- app.py +1 -1
Dockerfile
CHANGED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
# FROM nvidia/cuda:11.3.1-cudnn8-runtime-ubuntu20.04
|
| 2 |
FROM continuumio/anaconda3:latest
|
| 3 |
|
| 4 |
-
ENV
|
|
|
|
|
|
|
| 5 |
|
| 6 |
# Install apt packages
|
| 7 |
RUN set -ex \
|
|
@@ -19,7 +21,4 @@ COPY ./ /code
|
|
| 19 |
RUN conda install pip \
|
| 20 |
&& pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
-
# Port for the web server
|
| 23 |
-
EXPOSE 5000
|
| 24 |
-
|
| 25 |
CMD python app.py
|
|
|
|
| 1 |
# FROM nvidia/cuda:11.3.1-cudnn8-runtime-ubuntu20.04
|
| 2 |
FROM continuumio/anaconda3:latest
|
| 3 |
|
| 4 |
+
ENV GRADIO_SERVER_NAME=0.0.0.0
|
| 5 |
+
|
| 6 |
+
ENV GRADIO_SERVER_PORT=7860
|
| 7 |
|
| 8 |
# Install apt packages
|
| 9 |
RUN set -ex \
|
|
|
|
| 21 |
RUN conda install pip \
|
| 22 |
&& pip install --no-cache-dir -r requirements.txt
|
| 23 |
|
|
|
|
|
|
|
|
|
|
| 24 |
CMD python app.py
|
README.rst
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
Lecture 13: Serving, Hosting, and Deploying Models and Quality Control
|
| 3 |
======================================================================
|
| 4 |
|
| 5 |
-
|Tests| |Wheel| |Docker| |ReadTheDocs| |Huggingface|
|
| 6 |
|
| 7 |
.. contents:: Quick Links
|
| 8 |
:backlinks: none
|
|
@@ -80,7 +80,7 @@ To run:
|
|
| 80 |
docker run \
|
| 81 |
-it \
|
| 82 |
--rm \
|
| 83 |
-
-p
|
| 84 |
--name cv4e \
|
| 85 |
bluemellophone/cv4e:lecture13
|
| 86 |
|
|
@@ -163,7 +163,3 @@ If you experience issues running the gradio app on macOS, try the following:
|
|
| 163 |
.. |Huggingface| image:: https://img.shields.io/badge/HuggingFace-Running-yellow
|
| 164 |
:target: https://huggingface.co/spaces/CV4EcologySchool/Lecture-13
|
| 165 |
:alt: Huggingface
|
| 166 |
-
|
| 167 |
-
.. |Colab| image:: https://colab.research.google.com/assets/colab-badge.svg
|
| 168 |
-
:target: https://colab.research.google.com/github/googlecolab/colabtools/blob/master/notebooks/colab-github-demo.ipynb
|
| 169 |
-
:alt: Open in Colab
|
|
|
|
| 2 |
Lecture 13: Serving, Hosting, and Deploying Models and Quality Control
|
| 3 |
======================================================================
|
| 4 |
|
| 5 |
+
|Tests| |Wheel| |Docker| |ReadTheDocs| |Huggingface|
|
| 6 |
|
| 7 |
.. contents:: Quick Links
|
| 8 |
:backlinks: none
|
|
|
|
| 80 |
docker run \
|
| 81 |
-it \
|
| 82 |
--rm \
|
| 83 |
+
-p 7860:7860 \
|
| 84 |
--name cv4e \
|
| 85 |
bluemellophone/cv4e:lecture13
|
| 86 |
|
|
|
|
| 163 |
.. |Huggingface| image:: https://img.shields.io/badge/HuggingFace-Running-yellow
|
| 164 |
:target: https://huggingface.co/spaces/CV4EcologySchool/Lecture-13
|
| 165 |
:alt: Huggingface
|
|
|
|
|
|
|
|
|
|
|
|
app.py
CHANGED
|
@@ -50,4 +50,4 @@ interface = gr.Interface(
|
|
| 50 |
examples=[f'examples/example_{index}.jpg' for index in range(1, 31)],
|
| 51 |
)
|
| 52 |
|
| 53 |
-
interface.launch()
|
|
|
|
| 50 |
examples=[f'examples/example_{index}.jpg' for index in range(1, 31)],
|
| 51 |
)
|
| 52 |
|
| 53 |
+
interface.launch(server_name='0.0.0.0')
|