Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files1234567891011121314151617181920212223242526272829303132333435363738# FROM node:22.16.0FROM oven/bun:1.3.4# Install ffmpeg# RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/*# Create a non-root user withRUN useradd -m -u 2000 userUSER userENV PATH="/home/user/.local/bin:$PATH"# Set working directoryWORKDIR /app# COPY --chown=user bun.lockb bun.lockbCOPY --chown=user package.json package.jsonRUN bun install# Copy package files and install dependencies#COPY --chown=user package*.json ./# RUN npm install# Copy the rest of the application sourceCOPY --chown=user . /app# Expose the port if needed (optional, depending on the hosting environment)EXPOSE 7860EXPOSE 8000EXPOSE 8080# Run the Node.js application# CMD ["node", "app.js"]CMD ["bun", "app.js"]123456789101112131415161718192021# Use the official lightweight Python imageFROM python:3.9-slim# Set the working directoryWORKDIR /app# Copy dependencies and install themCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt# Copy the rest of the application codeCOPY . .# Create a directory for static files (frontend) if it doesn't existRUN mkdir -p static# Expose the port Hugging Face expectsEXPOSE 7860# Run the FastAPI serverCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
Dockerfile+13-30