Muhammad-Mehdi commited on
Commit
a2234fc
·
1 Parent(s): eb03313

new DB fixed

Browse files
Files changed (2) hide show
  1. README.md +10 -0
  2. deploy/huggingface/Dockerfile +21 -0
README.md CHANGED
@@ -1,3 +1,13 @@
 
 
 
 
 
 
 
 
 
 
1
  <p align="center">
2
  <picture>
3
  <source media="(prefers-color-scheme: dark)" srcset="marketing/logo/notestack-logo.svg">
 
1
+ ---
2
+ title: NoteStack Test
3
+ emoji: 📚
4
+ colorFrom: indigo
5
+ colorTo: purple
6
+ sdk: docker
7
+ app_port: 7860
8
+ pinned: false
9
+ ---
10
+
11
  <p align="center">
12
  <picture>
13
  <source media="(prefers-color-scheme: dark)" srcset="marketing/logo/notestack-logo.svg">
deploy/huggingface/Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Hugging Face Spaces image, built from the repo root (the Space holds the whole repo).
2
+ # Upload this file to the Space root as `Dockerfile`. One container, non-root uid 1000, port 7860;
3
+ # the worker runs inside the API process.
4
+ FROM python:3.12-slim
5
+
6
+ RUN useradd -m -u 1000 user
7
+ WORKDIR /app
8
+ ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 \
9
+ ENV=production \
10
+ RUN_WORKER_IN_API=true \
11
+ CORPUS_CACHE_DIR=/app/.corpus-cache \
12
+ LOCAL_STORAGE_DIR=/app/.storage
13
+
14
+ COPY backend/requirements.txt .
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+ COPY --chown=user backend/ .
17
+ RUN rm -f .env
18
+ USER user
19
+
20
+ EXPOSE 7860
21
+ CMD ["sh", "-c", "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 7860 --proxy-headers --forwarded-allow-ips='*'"]