Commit ·
7822606
1
Parent(s): bc03767
Deploy DeepFake Detector API - 2026-03-07 10:16:38
Browse files- Dockerfile +0 -3
- start.sh +9 -1
Dockerfile
CHANGED
|
@@ -33,9 +33,6 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
| 33 |
# Copy application code
|
| 34 |
COPY --chown=user:user . /app
|
| 35 |
|
| 36 |
-
# Create cache directory for Hugging Face models
|
| 37 |
-
RUN mkdir -p /app/.hf_cache
|
| 38 |
-
|
| 39 |
# Expose HF Spaces port
|
| 40 |
EXPOSE 7860
|
| 41 |
|
|
|
|
| 33 |
# Copy application code
|
| 34 |
COPY --chown=user:user . /app
|
| 35 |
|
|
|
|
|
|
|
|
|
|
| 36 |
# Expose HF Spaces port
|
| 37 |
EXPOSE 7860
|
| 38 |
|
start.sh
CHANGED
|
@@ -1,7 +1,15 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
# Startup script for deployment
|
| 3 |
-
#
|
|
|
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
PORT=${PORT:-7860}
|
| 6 |
|
| 7 |
echo "Starting uvicorn on port $PORT"
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
# Startup script for deployment
|
| 3 |
+
# Loads .env file if present, then uses PORT environment variable
|
| 4 |
+
# Defaults: 7860 (HuggingFace Spaces) or 8000
|
| 5 |
|
| 6 |
+
# Load .env file if it exists
|
| 7 |
+
if [ -f .env ]; then
|
| 8 |
+
echo "Loading environment from .env file"
|
| 9 |
+
export $(grep -v '^#' .env | xargs)
|
| 10 |
+
fi
|
| 11 |
+
|
| 12 |
+
# Use PORT from env, .env file, or default to 7860
|
| 13 |
PORT=${PORT:-7860}
|
| 14 |
|
| 15 |
echo "Starting uvicorn on port $PORT"
|