doublelotus commited on
Commit
e9cd1d1
·
1 Parent(s): 29b8080

hello world

Browse files
Files changed (3) hide show
  1. Dockerfile +13 -0
  2. main.py +12 -0
  3. requirements.txt +16 -0
Dockerfile ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ WORKDIR /code
4
+
5
+ COPY ./requirements.txt /code/requirements.txt
6
+
7
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
+
9
+ RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
10
+
11
+ COPY . .
12
+
13
+ CMD ["gunicorn", "-b", "0.0.0.0:7860", "main:app"]
main.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask
2
+ from flask_cors import CORS
3
+
4
+ app = Flask(__name__)
5
+ CORS(app)
6
+
7
+ @app.route('/')
8
+ def hello():
9
+ return 'hello world'
10
+
11
+ if __name__ == '__main__':
12
+ app.run(debug=True)
requirements.txt ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ flask
2
+ gunicorn
3
+ flask-cors
4
+ transformers
5
+ # numpy
6
+ # opencv-python
7
+ # Pillow
8
+ # requests
9
+ # git+https://github.com/facebookresearch/segment-anything.git
10
+ # --extra-index-url https://download.pytorch.org/whl/cu113
11
+ # torch
12
+ # torchvision
13
+ # matplotlib # Required for image processing and mask visualization
14
+ # onnxruntime
15
+ # onnx
16
+ # pycocotools