aliskairraul commited on
Commit
a5c53dd
·
1 Parent(s): 54da634

Primer commit dirigido a Huggin Face

Browse files
Files changed (7) hide show
  1. .github/workflows/deploy.yml +33 -0
  2. .gitignore +3 -1
  3. Dockerfile +16 -0
  4. README.md +11 -0
  5. ayuda-santi.txt +0 -45
  6. app.py → main.py +0 -0
  7. runtime.txt +1 -1
.github/workflows/deploy.yml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Deploy to Hugging Face Spaces
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ deploy:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout repository
13
+ uses: actions/checkout@v3
14
+ with:
15
+ fetch-depth: 0
16
+
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v4
19
+ with:
20
+ python-version: "3.11"
21
+
22
+ - name: Install dependencies
23
+ run: |
24
+ python -m pip install --upgrade pip
25
+ pip install -r requirements.txt
26
+
27
+ - name: Deploy to Hugging Face Spaces
28
+ env:
29
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
30
+ run: |
31
+ git lfs install
32
+ git remote add space https://huggingface.co/spaces/raulstudent/labs_2
33
+ git push https://raulstudent:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/raulstudent/labs_2 main --force
.gitignore CHANGED
@@ -3,7 +3,9 @@ venv/
3
 
4
  # Excluir el archivo .flake8
5
  .flake8
6
- ayuda-santi.txt
7
 
8
  # Excluir todas las carpetas __pycache__
9
  __pycache__/
 
 
 
 
3
 
4
  # Excluir el archivo .flake8
5
  .flake8
 
6
 
7
  # Excluir todas las carpetas __pycache__
8
  __pycache__/
9
+
10
+ # Excluir el archivo ayuda-santi.txt (debe estar al final si hay reglas más generales)
11
+ ayuda-santi.txt
Dockerfile ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ COPY requirements.txt requirements.txt
6
+ COPY main.py main.py
7
+ COPY utils/ utils/
8
+ COPY assets/ assets/
9
+ COPY components/ components/
10
+ COPY data/ data/
11
+
12
+ RUN pip install -r requirements.txt
13
+
14
+ EXPOSE 8080
15
+
16
+ CMD ["gunicorn", "--bind", "0.0.0.0:8080", "main:server", "--log-level", "debug"]
README.md CHANGED
@@ -1,3 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
1
  <div style="text-align: center; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; padding: 10px 0;">
2
  <h1 style="color: lightblue; font-size: 2em;">Proyecto Labs 2</h1>
3
  </div>
 
1
+ ---
2
+ title: "Telecomunicaciones Argentina"
3
+ emoji: "🚀"
4
+ colorFrom: "blue"
5
+ colorTo: "green"
6
+ sdk: "docker"
7
+ app_file: "main.py"
8
+ app_port: 8080
9
+ python_version: "3.11"
10
+ ---
11
+
12
  <div style="text-align: center; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; padding: 10px 0;">
13
  <h1 style="color: lightblue; font-size: 2em;">Proyecto Labs 2</h1>
14
  </div>
ayuda-santi.txt DELETED
@@ -1,45 +0,0 @@
1
- Buenos dias
2
- Contexto: Tratando de desplegar en `Render` una app realizada en Dash de Plotly en Python
3
- Al iniciar el despliegue me da este error
4
- Cloning from https://github.com/raulsantiago654321/lab2
5
- fatal: could not read Username for 'https://github.com': terminal prompts disabled
6
-
7
-
8
- en mi repositorio tengo un archivo llamado `Procfile` que tiene lo siguiente:
9
- web: gunicorn app:server
10
-
11
- en mi repositorio tengo un archivo llamado gunicorn_config.py con lo siguiente:
12
- workers = 2
13
- timeout = 120
14
-
15
- mi requirements.txt es el siguiente:
16
- dash==2.16.1
17
- dash_daq==0.5.0
18
- pandas==2.2.2
19
- plotly==5.21.0
20
- polars==1.2.1
21
- pyarrow==17.0.0
22
- gunicorn
23
-
24
- mi archivo app.py es el siguiente:
25
- # codigo
26
- # codigo
27
-
28
- app = Dash(
29
- __name__,
30
- suppress_callback_exceptions=True,
31
- title="Telecomunicaciones Argentina",
32
- meta_tags=[{"name": "viewport", "content": "width=device-width, initial-scale=1"}],
33
- )
34
-
35
- server = app.server
36
-
37
- # codigo
38
- # codigo
39
-
40
- if __name__ == "__main__":
41
- app.run_server(debug=False)
42
-
43
-
44
-
45
- No entiendo si en render se habilito una credencial a ese repositorio donde en una secuencia interactiva autorice la lectura de ese repositorio de render.. Porque pasa esto????
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app.py → main.py RENAMED
File without changes
runtime.txt CHANGED
@@ -1 +1 @@
1
- python-3.10.11
 
1
+ python-3.11