Spaces:
Sleeping
Sleeping
Upload 5 files
Browse files- Dockerfile +9 -18
- README.md +0 -5
- package.json +4 -11
- requirements.txt +6 -15
Dockerfile
CHANGED
|
@@ -1,17 +1,15 @@
|
|
| 1 |
-
# Real DJ Mixxx System - Docker Edition (
|
| 2 |
# Professional DJ Software for Hugging Face Spaces
|
| 3 |
|
| 4 |
FROM node:18-alpine
|
| 5 |
|
| 6 |
-
# Install system dependencies
|
| 7 |
RUN apk add --no-cache \
|
| 8 |
ffmpeg \
|
| 9 |
curl \
|
| 10 |
python3 \
|
| 11 |
py3-pip \
|
| 12 |
python3-dev \
|
| 13 |
-
gcc \
|
| 14 |
-
g++ \
|
| 15 |
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
|
| 17 |
# Set working directory
|
|
@@ -20,36 +18,29 @@ WORKDIR /app
|
|
| 20 |
# Copy package.json first for better caching
|
| 21 |
COPY package.json .
|
| 22 |
|
| 23 |
-
# Install Node.js dependencies
|
| 24 |
RUN npm install --omit=dev
|
| 25 |
|
| 26 |
# Install Python dependencies in a virtual environment
|
| 27 |
RUN python3 -m venv /opt/venv
|
| 28 |
ENV PATH="/opt/venv/bin:$PATH"
|
| 29 |
|
| 30 |
-
# Install Python dependencies
|
| 31 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 32 |
pip install --no-cache-dir \
|
| 33 |
fastapi \
|
| 34 |
uvicorn[standard] \
|
| 35 |
python-multipart \
|
| 36 |
-
librosa \
|
| 37 |
-
soundfile \
|
| 38 |
pydub \
|
| 39 |
-
scipy \
|
| 40 |
-
matplotlib \
|
| 41 |
numpy \
|
| 42 |
-
scikit-learn \
|
| 43 |
requests \
|
| 44 |
-
aiofiles
|
| 45 |
-
orjson \
|
| 46 |
-
gradio
|
| 47 |
|
| 48 |
# Copy application files
|
| 49 |
COPY . .
|
| 50 |
|
| 51 |
-
# Make scripts executable
|
| 52 |
-
RUN chmod +x start.sh serve.sh
|
| 53 |
|
| 54 |
# Create non-root user for security
|
| 55 |
RUN addgroup -g 1001 -S nodejs && \
|
|
@@ -64,7 +55,7 @@ EXPOSE 7860
|
|
| 64 |
|
| 65 |
# Health check
|
| 66 |
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
|
| 67 |
-
CMD curl -f http://localhost:7860/ || exit 1
|
| 68 |
|
| 69 |
# Start application with virtual environment activated
|
| 70 |
-
CMD ["sh", "-c", "source /opt/venv/bin/activate &&
|
|
|
|
| 1 |
+
# Real DJ Mixxx System - Docker Edition (OPTIMIZED)
|
| 2 |
# Professional DJ Software for Hugging Face Spaces
|
| 3 |
|
| 4 |
FROM node:18-alpine
|
| 5 |
|
| 6 |
+
# Install minimal system dependencies
|
| 7 |
RUN apk add --no-cache \
|
| 8 |
ffmpeg \
|
| 9 |
curl \
|
| 10 |
python3 \
|
| 11 |
py3-pip \
|
| 12 |
python3-dev \
|
|
|
|
|
|
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
# Set working directory
|
|
|
|
| 18 |
# Copy package.json first for better caching
|
| 19 |
COPY package.json .
|
| 20 |
|
| 21 |
+
# Install Node.js dependencies (minimal)
|
| 22 |
RUN npm install --omit=dev
|
| 23 |
|
| 24 |
# Install Python dependencies in a virtual environment
|
| 25 |
RUN python3 -m venv /opt/venv
|
| 26 |
ENV PATH="/opt/venv/bin:$PATH"
|
| 27 |
|
| 28 |
+
# Install Python dependencies (simplified)
|
| 29 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 30 |
pip install --no-cache-dir \
|
| 31 |
fastapi \
|
| 32 |
uvicorn[standard] \
|
| 33 |
python-multipart \
|
|
|
|
|
|
|
| 34 |
pydub \
|
|
|
|
|
|
|
| 35 |
numpy \
|
|
|
|
| 36 |
requests \
|
| 37 |
+
aiofiles
|
|
|
|
|
|
|
| 38 |
|
| 39 |
# Copy application files
|
| 40 |
COPY . .
|
| 41 |
|
| 42 |
+
# Make scripts executable (if any)
|
| 43 |
+
# RUN chmod +x start.sh serve.sh
|
| 44 |
|
| 45 |
# Create non-root user for security
|
| 46 |
RUN addgroup -g 1001 -S nodejs && \
|
|
|
|
| 55 |
|
| 56 |
# Health check
|
| 57 |
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
|
| 58 |
+
CMD curl -f http://localhost:7860/health || exit 1
|
| 59 |
|
| 60 |
# Start application with virtual environment activated
|
| 61 |
+
CMD ["sh", "-c", "source /opt/venv/bin/activate && python server.py"]
|
README.md
CHANGED
|
@@ -1,8 +1,3 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
title: Real DJ Mixxx System - Docker Edition
|
| 4 |
-
sdk: docker
|
| 5 |
-
---
|
| 6 |
# 🎧 Real DJ Mixxx System - Docker Edition
|
| 7 |
|
| 8 |
Professional DJ Software for Hugging Face Spaces
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# 🎧 Real DJ Mixxx System - Docker Edition
|
| 2 |
|
| 3 |
Professional DJ Software for Hugging Face Spaces
|
package.json
CHANGED
|
@@ -5,10 +5,7 @@
|
|
| 5 |
"main": "server.py",
|
| 6 |
"scripts": {
|
| 7 |
"start": "uvicorn server:app --host 0.0.0.0 --port 7860",
|
| 8 |
-
"dev": "uvicorn server:app --host 0.0.0.0 --port 7860 --reload"
|
| 9 |
-
"serve": "npx serve .",
|
| 10 |
-
"build": "echo 'Docker build - no build step needed'",
|
| 11 |
-
"test": "echo 'Tests not implemented yet'"
|
| 12 |
},
|
| 13 |
"keywords": [
|
| 14 |
"dj",
|
|
@@ -39,18 +36,14 @@
|
|
| 39 |
"node": ">=18.0.0",
|
| 40 |
"python": ">=3.9"
|
| 41 |
},
|
| 42 |
-
"dependencies": {
|
| 43 |
-
"express": "^4.18.2",
|
| 44 |
-
"cors": "^2.8.5"
|
| 45 |
-
},
|
| 46 |
"devDependencies": {},
|
| 47 |
"files": [
|
| 48 |
"server.py",
|
| 49 |
"Dockerfile",
|
| 50 |
-
"package.json",
|
| 51 |
"requirements.txt",
|
| 52 |
-
"
|
| 53 |
-
"
|
| 54 |
],
|
| 55 |
"directories": {
|
| 56 |
"doc": "./"
|
|
|
|
| 5 |
"main": "server.py",
|
| 6 |
"scripts": {
|
| 7 |
"start": "uvicorn server:app --host 0.0.0.0 --port 7860",
|
| 8 |
+
"dev": "uvicorn server:app --host 0.0.0.0 --port 7860 --reload"
|
|
|
|
|
|
|
|
|
|
| 9 |
},
|
| 10 |
"keywords": [
|
| 11 |
"dj",
|
|
|
|
| 36 |
"node": ">=18.0.0",
|
| 37 |
"python": ">=3.9"
|
| 38 |
},
|
| 39 |
+
"dependencies": {},
|
|
|
|
|
|
|
|
|
|
| 40 |
"devDependencies": {},
|
| 41 |
"files": [
|
| 42 |
"server.py",
|
| 43 |
"Dockerfile",
|
|
|
|
| 44 |
"requirements.txt",
|
| 45 |
+
"package.json",
|
| 46 |
+
"README.md"
|
| 47 |
],
|
| 48 |
"directories": {
|
| 49 |
"doc": "./"
|
requirements.txt
CHANGED
|
@@ -1,26 +1,17 @@
|
|
| 1 |
# Real DJ Mixxx System - Docker Edition
|
| 2 |
-
# Python Dependencies
|
| 3 |
|
| 4 |
-
# Core Framework
|
| 5 |
fastapi>=0.104.0
|
| 6 |
uvicorn[standard]>=0.24.0
|
| 7 |
python-multipart>=0.0.6
|
| 8 |
|
| 9 |
-
# Audio Processing
|
| 10 |
pydub>=0.25.0
|
| 11 |
-
soundfile>=0.12.0
|
| 12 |
|
| 13 |
-
# Scientific Computing
|
| 14 |
numpy>=1.21.0
|
| 15 |
-
scipy>=1.9.0
|
| 16 |
|
| 17 |
-
# HTTP
|
| 18 |
aiofiles>=23.0.0
|
| 19 |
-
requests>=2.31.0
|
| 20 |
-
|
| 21 |
-
# File Handling
|
| 22 |
-
mutagen>=1.46.0
|
| 23 |
-
|
| 24 |
-
# Optional: Advanced audio processing
|
| 25 |
-
# librosa>=0.10.0 # Commented out due to build complexity
|
| 26 |
-
# matplotlib>=3.5.0 # Commented out - not needed for basic functionality
|
|
|
|
| 1 |
# Real DJ Mixxx System - Docker Edition
|
| 2 |
+
# Minimal Python Dependencies for FastAPI + Audio Processing
|
| 3 |
|
| 4 |
+
# Core Web Framework
|
| 5 |
fastapi>=0.104.0
|
| 6 |
uvicorn[standard]>=0.24.0
|
| 7 |
python-multipart>=0.0.6
|
| 8 |
|
| 9 |
+
# Audio Processing
|
| 10 |
pydub>=0.25.0
|
|
|
|
| 11 |
|
| 12 |
+
# Basic Scientific Computing
|
| 13 |
numpy>=1.21.0
|
|
|
|
| 14 |
|
| 15 |
+
# HTTP Utilities
|
| 16 |
aiofiles>=23.0.0
|
| 17 |
+
requests>=2.31.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|