Create Dockerfile
Browse files- Dockerfile +11 -0
Dockerfile
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.12
|
2 |
+
WORKDIR /code
|
3 |
+
RUN chmod 777 /code
|
4 |
+
RUN python -m pip install --upgrade pip && \
|
5 |
+
pip install requests gradio_client flask-cors gunicorn gevent bs4 huggingface_hub json
|
6 |
+
|
7 |
+
RUN --mount=type=secret,id=token,mode=0444,required=true \
|
8 |
+
--mount=type=secret,id=url,mode=0444,required=true \
|
9 |
+
curl -H "Authorization: Bearer $(cat /run/secrets/token)" -o app.py $(cat /run/secrets/url)
|
10 |
+
COPY . .
|
11 |
+
CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--timeout", "120", "--workers", "4", "--worker-class", "gevent"]
|