Spaces:
Running
Running
Test HF space deployment
Browse files- .github/workflows/deploy.yml +20 -0
- Dockerfile +20 -0
- README.md +37 -0
.github/workflows/deploy.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://HF_USERNAME:[email protected]/spaces/andreped/ohif4hf main
|
Dockerfile
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM ohif/app:v3.7.0-beta.74
|
2 |
+
|
3 |
+
# Set up a new user named "user" with user ID 1000
|
4 |
+
#RUN useradd -m -u 1000 user
|
5 |
+
|
6 |
+
# Switch to the "user" user
|
7 |
+
#USER user
|
8 |
+
|
9 |
+
# Set home to the user's home directory
|
10 |
+
ENV HOME=/home/user \
|
11 |
+
PATH=/home/user/.local/bin:$PATH
|
12 |
+
|
13 |
+
# Set the working directory to the user's home directory
|
14 |
+
WORKDIR $HOME/app
|
15 |
+
|
16 |
+
RUN ls
|
17 |
+
|
18 |
+
#CMD ["docker-compose", "-f", "/code/dsa/docker-compose.yml", "up", "-d"]
|
19 |
+
|
20 |
+
CMD ["nginx", "-g", "daemon off;"]
|
README.md
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: 'dsa4hf: Project to showcase AI solutions for medical applications in OHIF'
|
3 |
+
colorFrom: indigo
|
4 |
+
colorTo: indigo
|
5 |
+
sdk: docker
|
6 |
+
app_port: 8080
|
7 |
+
emoji: 🔬
|
8 |
+
pinned: false
|
9 |
+
license: mit
|
10 |
+
---
|
11 |
+
|
12 |
+
# ohif4hf
|
13 |
+
|
14 |
+
This project was made to showcase developed plugins for OHIF through hosting on Hugging Face spaces.
|
15 |
+
|
16 |
+
The project is a work-in-progress. I will make a release when I have it working. Stay tuned!
|
17 |
+
|
18 |
+
## Getting started
|
19 |
+
|
20 |
+
#### Deployment
|
21 |
+
|
22 |
+
When the solution is ready, the website should be accessible on [Hugging Face](https://huggingface.co/spaces/andreped/ohif4hf).
|
23 |
+
|
24 |
+
#### Development
|
25 |
+
|
26 |
+
```
|
27 |
+
git clone https://github.com/andreped/ohif4hf.git
|
28 |
+
docker build -t ohif4hf .
|
29 |
+
docker run -e PORT=8080 -p 3000:8080/tcp --name ohif4hf-container ohif4hf
|
30 |
+
```
|
31 |
+
|
32 |
+
To go inside docker image and debug, at the bottom of the Dockerfile, add `ENTRYPOINT [ "/bin/sh" ]` before running.
|
33 |
+
|
34 |
+
## Credit
|
35 |
+
|
36 |
+
I did not develop OHIF, only implemented some plugins and showcased deployment on Hugging Face space.
|
37 |
+
Credit should be given to the developers of OHIF for making such an amazing open software solution!
|