Spaces:
Sleeping
Sleeping
File size: 1,336 Bytes
1bcce96 fd52f31 1bcce96 fd52f31 1bcce96 fd52f31 fee9ffa 1bcce96 fd52f31 fee9ffa fd52f31 2251ba3 fee9ffa fd52f31 2251ba3 fd52f31 1bcce96 0d27572 1bcce96 fd52f31 1bcce96 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
FROM python:3.11-slim
WORKDIR /app
# Install ffmpeg and other dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ffmpeg \
build-essential \
nodejs \
npm \
git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Create directories for temp files
RUN mkdir -p temp_audio temp static
# Copy the application code
COPY . .
# List directory contents
RUN ls -la
# Execute the build frontend script to prepare frontend code
RUN chmod +x build_frontend.sh && \
./build_frontend.sh && \
echo "Frontend build script completed successfully"
# Verify the static files
RUN echo "Checking static directory contents:" && \
ls -la ./static && \
if [ -f "./static/index.html" ]; then \
echo "Frontend index.html found"; \
else \
echo "WARNING: Frontend index.html not found in static directory"; \
exit 1; \
fi && \
if [ -d "./static/assets" ]; then \
echo "Frontend assets directory found"; \
ls -la ./static/assets; \
else \
echo "WARNING: Frontend assets directory not found"; \
fi
# Install backend dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Default environment variables
ENV PORT=7860
ENV HOST=0.0.0.0
# Expose the port
EXPOSE 7860
# Command to run the application
CMD ["python", "app.py"] |