Zachary Schillaci
commited on
Commit
·
7a5c22f
1
Parent(s):
f5ce69e
Docker build and HF deploy
Browse files- .github/workflows/sync_to_spaces.yml +20 -0
- .streamlit/config.toml +10 -0
- Dockerfile +12 -0
- docker-compose.yml +12 -0
.github/workflows/sync_to_spaces.yml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Sync to Hugging Face hub
|
2 |
+
on:
|
3 |
+
push:
|
4 |
+
branches: [main]
|
5 |
+
|
6 |
+
# to run this workflow manually from the Actions tab
|
7 |
+
workflow_dispatch:
|
8 |
+
|
9 |
+
jobs:
|
10 |
+
sync-to-hub:
|
11 |
+
runs-on: ubuntu-latest
|
12 |
+
steps:
|
13 |
+
- uses: actions/checkout@v3
|
14 |
+
with:
|
15 |
+
fetch-depth: 0
|
16 |
+
lfs: true
|
17 |
+
- name: Push to hub
|
18 |
+
env:
|
19 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
20 |
+
run: git push https://effixis:[email protected]/spaces/effixis/shared-amld-sql-injection-demo main
|
.streamlit/config.toml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[theme]
|
2 |
+
font = "sans serif"
|
3 |
+
|
4 |
+
[server]
|
5 |
+
port = 8050
|
6 |
+
enableWebsocketCompression= false
|
7 |
+
|
8 |
+
[browser]
|
9 |
+
serverPort = 8050
|
10 |
+
serverAddress = "localhost"
|
Dockerfile
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.10
|
2 |
+
|
3 |
+
WORKDIR /app
|
4 |
+
|
5 |
+
COPY requirements.txt /
|
6 |
+
RUN pip install -r /requirements.txt
|
7 |
+
|
8 |
+
COPY . /app/
|
9 |
+
|
10 |
+
EXPOSE 8050
|
11 |
+
|
12 |
+
CMD ["streamlit", "run", "Introduction.py"]
|
docker-compose.yml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
version: "3.9"
|
2 |
+
|
3 |
+
services:
|
4 |
+
backend:
|
5 |
+
restart: "no"
|
6 |
+
build:
|
7 |
+
context: .
|
8 |
+
dockerfile: Dockerfile
|
9 |
+
ports:
|
10 |
+
- 8050:8050
|
11 |
+
env_file:
|
12 |
+
- .env
|