Spaces:
Sleeping
Sleeping
Abdelrahman Almatrooshi commited on
Commit ·
65ab61d
1
Parent(s): ab8ff76
fix: resolve Dockerfile/gitignore; ignore L2CS weights (downloaded in Docker)
Browse files- .gitignore +3 -3
- Dockerfile +1 -25
.gitignore
CHANGED
|
@@ -42,10 +42,10 @@ htmlcov/
|
|
| 42 |
# Project specific
|
| 43 |
focus_guard.db
|
| 44 |
test_focus_guard.db
|
| 45 |
-
<<<<<<< HEAD
|
| 46 |
-
=======
|
| 47 |
static/
|
| 48 |
-
|
|
|
|
|
|
|
| 49 |
__pycache__/
|
| 50 |
docs/
|
| 51 |
docs
|
|
|
|
| 42 |
# Project specific
|
| 43 |
focus_guard.db
|
| 44 |
test_focus_guard.db
|
|
|
|
|
|
|
| 45 |
static/
|
| 46 |
+
# Large weights: fetch at build/runtime (see download_l2cs_weights.py)
|
| 47 |
+
checkpoints/L2CSNet_gaze360.pkl
|
| 48 |
+
models/L2CS-Net/models/L2CSNet_gaze360.pkl
|
| 49 |
__pycache__/
|
| 50 |
docs/
|
| 51 |
docs
|
Dockerfile
CHANGED
|
@@ -2,20 +2,12 @@ FROM python:3.10-slim
|
|
| 2 |
|
| 3 |
RUN useradd -m -u 1000 user
|
| 4 |
ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH
|
| 5 |
-
<<<<<<< HEAD
|
| 6 |
-
=======
|
| 7 |
-
|
| 8 |
-
>>>>>>> feature/integration2.0
|
| 9 |
ENV PYTHONUNBUFFERED=1
|
| 10 |
|
| 11 |
WORKDIR /app
|
| 12 |
|
| 13 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 14 |
-
<<<<<<< HEAD
|
| 15 |
libglib2.0-0 libsm6 libxrender1 libxext6 libxcb1 libgl1 libgles2 libegl1 libgomp1 \
|
| 16 |
-
=======
|
| 17 |
-
libglib2.0-0 libsm6 libxrender1 libxext6 libxcb1 libgl1 libgomp1 \
|
| 18 |
-
>>>>>>> feature/integration2.0
|
| 19 |
ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev \
|
| 20 |
libavdevice-dev libopus-dev libvpx-dev libsrtp2-dev \
|
| 21 |
build-essential nodejs npm git \
|
|
@@ -24,9 +16,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 24 |
RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu
|
| 25 |
|
| 26 |
COPY requirements.txt ./
|
| 27 |
-
|
| 28 |
-
RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu \
|
| 29 |
-
&& pip install --no-cache-dir -r requirements.txt
|
| 30 |
|
| 31 |
COPY . .
|
| 32 |
|
|
@@ -36,24 +26,10 @@ RUN npm install && npm run build && mkdir -p /app/static && cp -R dist/* /app/st
|
|
| 36 |
ENV FOCUSGUARD_CACHE_DIR=/app/.cache/focusguard
|
| 37 |
RUN python -c "from models.face_mesh import _ensure_model; _ensure_model()"
|
| 38 |
RUN python download_l2cs_weights.py || echo "[WARN] L2CS weights not downloaded — will run without gaze model"
|
| 39 |
-
=======
|
| 40 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 41 |
-
|
| 42 |
-
COPY . .
|
| 43 |
-
|
| 44 |
-
RUN npm install && npm run build && mkdir -p /app/static && cp -R dist/* /app/static/
|
| 45 |
-
|
| 46 |
-
ENV FOCUSGUARD_CACHE_DIR=/app/.cache/focusguard
|
| 47 |
-
RUN python -c "from models.face_mesh import _ensure_model; _ensure_model()"
|
| 48 |
-
>>>>>>> feature/integration2.0
|
| 49 |
|
| 50 |
RUN mkdir -p /app/data && chown -R user:user /app
|
| 51 |
|
| 52 |
USER user
|
| 53 |
EXPOSE 7860
|
| 54 |
|
| 55 |
-
<<<<<<< HEAD
|
| 56 |
CMD ["bash", "start.sh"]
|
| 57 |
-
=======
|
| 58 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--log-level", "info"]
|
| 59 |
-
>>>>>>> feature/integration2.0
|
|
|
|
| 2 |
|
| 3 |
RUN useradd -m -u 1000 user
|
| 4 |
ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
ENV PYTHONUNBUFFERED=1
|
| 6 |
|
| 7 |
WORKDIR /app
|
| 8 |
|
| 9 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
| 10 |
libglib2.0-0 libsm6 libxrender1 libxext6 libxcb1 libgl1 libgles2 libegl1 libgomp1 \
|
|
|
|
|
|
|
|
|
|
| 11 |
ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev \
|
| 12 |
libavdevice-dev libopus-dev libvpx-dev libsrtp2-dev \
|
| 13 |
build-essential nodejs npm git \
|
|
|
|
| 16 |
RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu
|
| 17 |
|
| 18 |
COPY requirements.txt ./
|
| 19 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
| 20 |
|
| 21 |
COPY . .
|
| 22 |
|
|
|
|
| 26 |
ENV FOCUSGUARD_CACHE_DIR=/app/.cache/focusguard
|
| 27 |
RUN python -c "from models.face_mesh import _ensure_model; _ensure_model()"
|
| 28 |
RUN python download_l2cs_weights.py || echo "[WARN] L2CS weights not downloaded — will run without gaze model"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
RUN mkdir -p /app/data && chown -R user:user /app
|
| 31 |
|
| 32 |
USER user
|
| 33 |
EXPOSE 7860
|
| 34 |
|
|
|
|
| 35 |
CMD ["bash", "start.sh"]
|
|
|
|
|
|
|
|
|