Spaces:
Runtime error
Runtime error
antagonico
commited on
Commit
路
49d0f22
1
Parent(s):
472d001
Upload 3 files
Browse files- Dockerfile +17 -0
- app.py +9 -0
- requirements.txt +1 -0
Dockerfile
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Usar una imagen base de Python
|
2 |
+
FROM python:3.9
|
3 |
+
|
4 |
+
# Establecer el directorio de trabajo
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Copiar los requerimientos de la aplicaci贸n
|
8 |
+
COPY requirements.txt .
|
9 |
+
|
10 |
+
# Instalar los requerimientos
|
11 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
+
|
13 |
+
# Copiar los archivos de la aplicaci贸n
|
14 |
+
COPY . .
|
15 |
+
|
16 |
+
# Establecer el comando para ejecutar la aplicaci贸n
|
17 |
+
CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]
|
app.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from flask import Flask
|
2 |
+
app = Flask(__name__)
|
3 |
+
|
4 |
+
@app.route('/')
|
5 |
+
def hello_world():
|
6 |
+
return 'Hello, World!'
|
7 |
+
|
8 |
+
if __name__ == '__main__':
|
9 |
+
app.run(host='0.0.0.0', port=7860)
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
flask==x.x.x
|