Skip to content

Commit

Permalink
feat: Dockerize the Project
Browse files Browse the repository at this point in the history
  • Loading branch information
ssk090 committed Dec 14, 2023
1 parent 5c90c4a commit 246f8f0
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Use an official Python runtime as a parent image
FROM python:3.8-slim

# Set the working directory in the container
WORKDIR /app

# Copy the current directory contents into the container at /app
COPY . /app

# Install any needed packages specified in requirements.txt
RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/*

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Make port 80 available to the world outside this container
EXPOSE 80

# Define environment variables
ENV INPUT_FILE_PATH="/app/videos/video.mp4"
ENV OPENAI_API_KEY=""
ENV OPENAI_MODEL="gpt-3.5-turbo-1106"
ENV MAX_TOKENS=15000
ENV OUTPUT_TYPE="vtt"
ENV OUTPUT_DIR="/app/output"

# Run run.sh when the container launches
CMD ["bash", "run.sh"]
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: "3"
services:
my_project:
build: .
volumes:
- ./videos:/app/videos
- ./output:/app/output
7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Sanchay AI dependencies
openai-whisper
tiktoken
openai

# Other dependencies
setuptools-rust

0 comments on commit 246f8f0

Please sign in to comment.