testing-y / Dockerfile
tecuts's picture
Update Dockerfile
90512b4 verified
raw
history blame contribute delete
966 Bytes
FROM python:3.10
WORKDIR /app
# Copy just the Deno binary from the official image - cleanest method
COPY --from=denoland/deno:bin /deno /usr/local/bin/deno
# Install ffmpeg only (no Node.js needed anymore)
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && \
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 appuser
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir --pre -r requirements.txt && \
pip install --no-cache-dir --upgrade "yt-dlp[default]"
# [default] pulls in yt-dlp-ejs automatically
# Set Deno cache dir to a writable location for non-root user
ENV DENO_DIR=/app/.deno_cache
ENV DENO_NO_UPDATE_CHECK=1
COPY . .
RUN find /app -type d -exec chmod 755 {} \; && \
find /app -type f -exec chmod 644 {} \; && \
chown -R appuser:appuser /app
USER appuser
EXPOSE 7860
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]