Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy to HF: upload dataset via spaces & bug fixes for the working demo. #432

Merged
merged 8 commits into from
Jul 10, 2023

Conversation

nsthorat
Copy link
Contributor

@nsthorat nsthorat commented Jul 9, 2023

  • Change deploy_hf: Uploads the data to the huggingface space. The server then checks whether the HF_DATA_FROM_SPACE environment flag is set, and downloads data before booting up the server. This will be set from the UI (as mentioned in instructions).
  • Fix an issue where the demo doesn't load in an iframe -- this is because a carbon component uses parent.addEventListener where parent is the container of the iframe, and causes a CORS issue. We fix this by setting window.parent = parent, so we don't try to reach outside the iframe.

Demo: https://huggingface.co/spaces/lilacai/nikhil_staging

@nsthorat nsthorat changed the title [not ready] Deploy to HF: upload dataset via spaces & bug fixes for the working demo. Deploy to HF: upload dataset via spaces & bug fixes for the working demo. Jul 9, 2023
@nsthorat nsthorat requested a review from dsmilkov July 9, 2023 23:35
@@ -12,12 +12,6 @@ WORKDIR /server
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add -k uvicorn.workers.UvicornWorker to the uvicorn line 30, (worth testing locally). See https://www.uvicorn.org/deployment/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@nsthorat nsthorat merged commit 59ee311 into main Jul 10, 2023
3 checks passed
@nsthorat nsthorat deleted the nik-hf branch July 10, 2023 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants