Skip to content

Commit 22bb324

Browse files
committed
initial commit
1 parent 50a91df commit 22bb324

File tree

5 files changed

+40
-2
lines changed

5 files changed

+40
-2
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.git

Dockerfile

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2+
# you will also find guides on how best to write your Dockerfile
3+
4+
FROM python:3.8
5+
6+
RUN useradd -m -u 1000 user
7+
USER user
8+
# Set home to the user's home directory
9+
ENV HOME=/home/user \
10+
PATH=/home/user/.local/bin:$PATH
11+
WORKDIR $HOME/app
12+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
13+
COPY --chown=user . $HOME/app
14+
ADD --chown=user ./.zeno_cache $HOME/app/.zeno_cache
15+
RUN chown user:user -R $HOME/app
16+
17+
COPY ./requirements.txt /code/requirements.txt
18+
19+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
20+
21+
22+
CMD ["zeno", "config.toml"]

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
# example-huggingface-spaces
2-
Setup for running Zeno on HuggingFace Spaces
1+
# Hosting Zeno on HuggingFace Spaces
2+
3+
[Please follow the instructions in the documentation for using this template](https://zenoml.com/docs/deployment).

config.toml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Update this file with your Zeno configuration. The port and host are the default for Hugging Face Spaces.
2+
functions = "./"
3+
view = "image-classification"
4+
metadata = "./metadata.csv"
5+
# path or URL
6+
data_path = "path/to/data"
7+
data_column = "data_column"
8+
label_column = "label_column"
9+
batch_size = 64
10+
11+
port = 7860
12+
host = "0.0.0.0"

requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
zenoml>=0.3.4
2+
pyarrow

0 commit comments

Comments
 (0)