Commit
·
c22146b
1
Parent(s):
f8a0bc2
change port to 7680; rename app to main; re-add gh action
Browse files- .github/workflows/main.yml +21 -0
- Dockerfile +3 -3
- README.md +1 -1
- docker-compose.yml +1 -1
- app.py → main.py +0 -0
.github/workflows/main.yml
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Sync to Hugging Face hub
|
2 |
+
on:
|
3 |
+
push:
|
4 |
+
branches: [main]
|
5 |
+
# to run this workflow manually from the Actions tab
|
6 |
+
workflow_dispatch:
|
7 |
+
|
8 |
+
jobs:
|
9 |
+
sync-to-hub:
|
10 |
+
runs-on: ubuntu-latest
|
11 |
+
steps:
|
12 |
+
- uses: actions/checkout@v3
|
13 |
+
with:
|
14 |
+
fetch-depth: 0
|
15 |
+
lfs: true
|
16 |
+
- name: Push to hub
|
17 |
+
env:
|
18 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
19 |
+
HF_USERNAME: ${{ secrets.HF_USERNAME }}
|
20 |
+
SPACE_NAME: ${{ secrets.SPACE_NAME }}
|
21 |
+
run: git push https://$HF_USERNAME:[email protected]/spaces/$HF_USERNAME/$SPACE_NAME main
|
Dockerfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
# Use an official Python runtime as a parent image
|
2 |
-
FROM python:3.
|
3 |
|
4 |
USER root
|
5 |
|
@@ -15,9 +15,9 @@ RUN apt-get update && apt-get install -y imagemagick && sed -i '91d' /etc/ImageM
|
|
15 |
RUN pip install --no-cache-dir -r requirements.txt
|
16 |
|
17 |
# Make port 8000 available to the world outside this container
|
18 |
-
EXPOSE
|
19 |
|
20 |
# Run main.py when the container launches
|
21 |
-
CMD ["python", "
|
22 |
|
23 |
USER 1001
|
|
|
1 |
# Use an official Python runtime as a parent image
|
2 |
+
FROM python:3.11-slim-bullseye
|
3 |
|
4 |
USER root
|
5 |
|
|
|
15 |
RUN pip install --no-cache-dir -r requirements.txt
|
16 |
|
17 |
# Make port 8000 available to the world outside this container
|
18 |
+
EXPOSE 7680
|
19 |
|
20 |
# Run main.py when the container launches
|
21 |
+
CMD ["python", "main.py"]
|
22 |
|
23 |
USER 1001
|
README.md
CHANGED
@@ -5,7 +5,7 @@ colorFrom: gray
|
|
5 |
colorTo: blue
|
6 |
sdk: docker
|
7 |
app_file: app.py
|
8 |
-
app_port:
|
9 |
pinned: true
|
10 |
license: cc-by-nc-4.0
|
11 |
short_description: A multilingual automatic speech transcription tool
|
|
|
5 |
colorTo: blue
|
6 |
sdk: docker
|
7 |
app_file: app.py
|
8 |
+
app_port: 7680
|
9 |
pinned: true
|
10 |
license: cc-by-nc-4.0
|
11 |
short_description: A multilingual automatic speech transcription tool
|
docker-compose.yml
CHANGED
@@ -4,6 +4,6 @@ services:
|
|
4 |
context: .
|
5 |
dockerfile: Dockerfile
|
6 |
ports:
|
7 |
-
- "
|
8 |
volumes:
|
9 |
- .:/app
|
|
|
4 |
context: .
|
5 |
dockerfile: Dockerfile
|
6 |
ports:
|
7 |
+
- "7680:7680"
|
8 |
volumes:
|
9 |
- .:/app
|
app.py → main.py
RENAMED
File without changes
|