generated from mozilla-ai/Blueprint-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile and sync_hf_space (#12)
* Add Dockerfile and sync_hf_space * Add reboot_space * Add README.md * Check GPU without torch * Update
- Loading branch information
Showing
6 changed files
with
87 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM nvidia/cuda:12.2.2-cudnn8-devel-ubuntu22.04 | ||
|
||
RUN apt-get update && apt-get install --no-install-recommends -y \ | ||
build-essential \ | ||
python3.10 \ | ||
python3.10-dev \ | ||
python3-pip \ | ||
git \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN useradd -m -u 1000 user | ||
|
||
USER user | ||
|
||
ENV HOME=/home/user \ | ||
PATH=/home/user/.local/bin:$PATH | ||
|
||
WORKDIR $HOME/app | ||
|
||
RUN pip3 install https://github.com/abetlen/llama-cpp-python/releases/download/v0.3.4-cu122/llama_cpp_python-0.3.4-cp310-cp310-linux_x86_64.whl | ||
RUN pip3 install structured-qa | ||
|
||
COPY --chown=user . $HOME/app | ||
|
||
EXPOSE 8501 | ||
ENTRYPOINT ["streamlit", "run", "app.py", "--server.enableXsrfProtection", "false"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: Structured Qa | ||
emoji: 📚 | ||
colorFrom: green | ||
colorTo: purple | ||
sdk: docker | ||
app_port: 8501 | ||
pinned: false | ||
license: apache-2.0 | ||
short_description: Question answering for structured documents | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import os | ||
|
||
from huggingface_hub import HfApi | ||
|
||
if __name__ == "__main__": | ||
api = HfApi() | ||
api.restart_space( | ||
repo_id="mozilla-ai/structured-qa", | ||
token=os.getenv("HF_TOKEN"), | ||
factory_reboot=True, | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters