EchaRz commited on
Commit
7b974dc
·
1 Parent(s): 56783f6

Add Dockerfile

Browse files
Files changed (2) hide show
  1. Dockerfile +12 -0
  2. app.py +1 -1
Dockerfile ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ WORKDIR /workspace
4
+
5
+ COPY requirements.txt .
6
+ RUN pip install --no-cache-dir -r requirements.txt
7
+
8
+ COPY . .
9
+
10
+ EXPOSE 7860
11
+
12
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
app.py CHANGED
@@ -590,7 +590,7 @@ if __name__ == "__main__":
590
  print(f"Definitions DB: {DATABASE_CONFIG['definitions_db']}")
591
 
592
  import uvicorn
593
- port = int(os.environ.get("PORT", 8000))
594
  uvicorn.run(app, host="0.0.0.0", port=port)
595
 
596
 
 
590
  print(f"Definitions DB: {DATABASE_CONFIG['definitions_db']}")
591
 
592
  import uvicorn
593
+ port = int(os.environ.get("PORT", 7860))
594
  uvicorn.run(app, host="0.0.0.0", port=port)
595
 
596