File size: 4,225 Bytes
9431df7
 
 
 
1abb992
8a15194
 
 
9431df7
fe66731
 
7a1b339
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
---
title: Webvowl
emoji: 🌍
short_description: Hosting of Webovwl
sdk: docker
pinned: false
---

---
WebVOWL [![Build Status](https://travis-ci.org/VisualDataWeb/WebVOWL.svg?branch=master)](https://travis-ci.org/VisualDataWeb/WebVOWL)
=======


# Deploying WebVOWL to Hugging Face Spaces

This guide explains how to deploy WebVOWL to Hugging Face Spaces using Docker.

## Background

The original WebVOWL instance at https://visualdataweb.org/ is no longer available (the domain is no longer owned by VisualDataWeb). This deployment guide was created to help the community continue to access and use WebVOWL through free hosting platforms like Hugging Face Spaces.

## Live Community Deployment

A working instance of WebVOWL is available at:
**https://huggingface.co/spaces/htafer/webvowl**

This deployment is provided as a free community service, thanks to Hugging Face's generous hosting platform.

## Prerequisites

1. A Hugging Face account (sign up at https://huggingface.co)
2. Git installed on your local machine

## Deployment Steps

### 1. Create a New Space

1. Go to https://huggingface.co/spaces
2. Click "Create new Space"
3. Configure your Space:
   - **Name**: Choose a name (e.g., `webvowl`)
   - **License**: MIT (or your preferred license)
   - **SDK**: Select **Docker**
   - **Visibility**: Public or Private (your choice)
4. Click "Create Space"

### 2. Clone the Space Repository

After creating the Space, clone it to your local machine:

```bash
git clone https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME
cd YOUR_SPACE_NAME
```

### 3. Copy WebVOWL Files

Copy the following files from your WebVOWL directory to the Space directory:

```bash
# From your WebVOWL directory
cp Dockerfile /path/to/YOUR_SPACE_NAME/
cp docker-compose.yml /path/to/YOUR_SPACE_NAME/
cp package.json /path/to/YOUR_SPACE_NAME/
cp Gruntfile.js /path/to/YOUR_SPACE_NAME/
cp webpack.config.js /path/to/YOUR_SPACE_NAME/
cp .jshintrc /path/to/YOUR_SPACE_NAME/
cp .jshintignore /path/to/YOUR_SPACE_NAME/
cp -r src /path/to/YOUR_SPACE_NAME/
cp -r util /path/to/YOUR_SPACE_NAME/
cp README.md /path/to/YOUR_SPACE_NAME/
```

Or use the provided `README_HUGGINGFACE.md` file as your Space's README.

### 4. Push to Hugging Face

```bash
cd /path/to/YOUR_SPACE_NAME
git add .
git commit -m "Initial WebVOWL deployment"
git push
```

### 5. Wait for Build

Hugging Face will automatically build your Docker container. You can monitor the build process in the "Logs" tab of your Space.

The build process includes:
- Building OWL2VOWL from source (Java/Maven)
- Building WebVOWL frontend (Node.js)
- Deploying to Tomcat server

This may take 5-10 minutes for the first build.

**Note**: The Dockerfile has been updated to fix artifact download issues that were present in earlier versions. The current multi-stage build process now successfully builds both OWL2VOWL and WebVOWL from source.

### 6. Access Your Application

Once the build is complete, your WebVOWL instance will be available at:
```
https://YOUR_USERNAME-YOUR_SPACE_NAME.hf.space
```

## Configuration Notes

- **Port**: The application runs on port 7860 (Hugging Face Spaces standard port)
- **Memory**: The default Space has 16GB RAM, which should be sufficient for WebVOWL
- **Persistent Storage**: Hugging Face Spaces are stateless. If you need persistent storage, consider using Hugging Face Datasets or external storage

## Troubleshooting

### Build Fails

Check the "Logs" tab in your Space for error messages. Common issues:
- Insufficient memory during Maven build
- Network issues downloading dependencies

### Application Not Responding

- Check that the Dockerfile exposes port 7860
- Verify Tomcat is running by checking the logs
- Ensure the WAR file was properly extracted

## Updating Your Deployment

To update your deployment:

```bash
cd /path/to/YOUR_SPACE_NAME
# Make your changes
git add .
git commit -m "Update description"
git push
```

Hugging Face will automatically rebuild and redeploy your Space.

## Resources

- [Hugging Face Spaces Documentation](https://huggingface.co/docs/hub/spaces)
- [Docker Spaces Guide](https://huggingface.co/docs/hub/spaces-sdks-docker)
- [WebVOWL GitHub](https://github.com/VisualDataWeb/WebVOWL)