Ajout Docker

This commit is contained in:
François Pelletier 2024-10-14 13:17:17 -04:00
parent 26938f8294
commit 2f1be80a4b
5 changed files with 96 additions and 12 deletions

32
Dockerfile Normal file
View file

@ -0,0 +1,32 @@
# Use an official Python runtime as a parent image
FROM python:3.12-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
ffmpeg \
libsndfile1 \
&& rm -rf /var/lib/apt/lists/*
# Create a volume for the Whisper model
VOLUME /root/.cache/huggingface
# Make port 8501 available to the world outside this container
EXPOSE 8501
# Set the working directory in the container
WORKDIR /app
# Copy requirements.txt
COPY requirements.txt /app
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Define environment variable
ENV NAME=ReelCaptionMaker
# Copy the current directory contents into the container at /app
COPY . /app
# Run app.py when the container launches
CMD ["streamlit", "run", "app.py"]