hemsby commited on
Commit
4f8d612
·
1 Parent(s): 5d2f157

ci: fix Dockerfile entrypoint, add HuggingFace deploy workflow

Browse files

- Dockerfile: point entrypoint to app.py, copy module files instead of src/
- Add GitHub Actions workflow to sync main → HF Spaces on push
- HF Space: DecodeMarketing/Correlation-network

Files changed (2) hide show
  1. .github/workflows/main.yml +18 -0
  2. Dockerfile +3 -3
.github/workflows/main.yml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Sync to Hugging Face hub
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ workflow_dispatch:
6
+
7
+ jobs:
8
+ sync-to-hub:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v3
12
+ with:
13
+ fetch-depth: 0
14
+ lfs: true
15
+ - name: Push to hub
16
+ env:
17
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
18
+ run: git push https://DecodeMarketing:$HF_TOKEN@huggingface.co/spaces/DecodeMarketing/Correlation-network main
Dockerfile CHANGED
@@ -9,12 +9,12 @@ RUN apt-get update && apt-get install -y \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
  COPY requirements.txt ./
12
- COPY src/ ./src/
13
-
14
  RUN pip3 install -r requirements.txt
15
 
 
 
16
  EXPOSE 8501
17
 
18
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
19
 
20
- ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
  COPY requirements.txt ./
 
 
12
  RUN pip3 install -r requirements.txt
13
 
14
+ COPY app.py config.py parse_excel.py build_network.py ./
15
+
16
  EXPOSE 8501
17
 
18
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
19
 
20
+ ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]