DESI_Spectra_Zoo / steps.md
matthieulel's picture
init app
00d1277
|
Raw
History Blame
1.55 kB

DESI Spectra Zoo Setup Guide

Deploy to HuggingFace Spaces

1. Create a new Space

  • Go to huggingface.co/new-space
  • Choose a name (e.g. desi-spectra-zoo)
  • Select Docker as the SDK
  • Set visibility to Public or Private
  • Click Create Space

2. Clone the Space and add files

git clone https://huggingface.co/spaces/YOUR_USERNAME/desi-spectra-zoo
cd desi-spectra-zoo
# Copy all project files into this directory:
# app.py, Dockerfile, requirements.txt, dataset_config.yaml, src/
git add .
git commit -m "Initial deploy"
git push

3. Create a HuggingFace dataset for logging

4. Create a HuggingFace token

5. Add secrets to the Space

  • Go to your Space's Settings page
  • Under Repository secrets, add:
    • HF_LOG_REPO_ID = YOUR_USERNAME/desi-spectra-zoo-logs
    • HF_TOKEN = the token from step 4

The Space will automatically rebuild after adding secrets.

6. Local development (optional)

Create a .env file in the project root:

HF_LOG_REPO_ID=YOUR_USERNAME/desi-spectra-zoo-logs
HF_TOKEN=hf_your_token_here

Make sure .env is in .gitignore (it already is by default).

Run locally:

python app.py