Spaces:
Runtime error
Runtime error
Commit
·
8ddb5d5
1
Parent(s):
70a219f
Create Dockerfile
Browse files- Dockerfile +21 -0
Dockerfile
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
2 |
+
# you will also find guides on how best to write your Dockerfile
|
3 |
+
|
4 |
+
FROM python:3.9
|
5 |
+
|
6 |
+
WORKDIR /code
|
7 |
+
|
8 |
+
COPY ./requirements.txt /code/requirements.txt
|
9 |
+
|
10 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
+
|
12 |
+
# Install dependencies
|
13 |
+
RUN git clone https://github.com/facebookresearch/detectron2.git
|
14 |
+
RUN python -m pip install -e detectron2
|
15 |
+
RUN apt-get update && apt-get install libgl1 -y
|
16 |
+
RUN pip install -U nltk
|
17 |
+
RUN [ "python3", "-c", "import nltk; nltk.download('punkt', download_dir='/usr/local/nltk_data')" ]
|
18 |
+
|
19 |
+
COPY . .
|
20 |
+
|
21 |
+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|