video-text / Dockerfile
Elalimy's picture
Update Dockerfile
3c90145 verified
raw
history blame
817 Bytes
# Use the official Python image from the Docker Hub
FROM python:3.9-slim
# Set environment variables
ENV FLASK_APP=app.py
ENV FLASK_RUN_HOST=0.0.0.0
ENV FLASK_RUN_PORT=80
ENV XDG_CACHE_HOME=/app/.cache
# Set a writable cache directory
# Install ffmpeg and other dependencies
RUN apt-get update && \
apt-get install -y ffmpeg && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /app
# Create the cache and uploads directories
RUN mkdir -p /app/.cache /app/uploads && chmod 777 /app/.cache /app/uploads
# Copy the application files to the container
COPY . /app
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Expose the port on which the app will run
EXPOSE 80
# Run the Flask app
CMD ["flask", "run", "--host=0.0.0.0", "--port=80"]