File size: 904 Bytes
af71291
225a76f
bb0a58d
af71291
d9d3e5f
 
89cb06a
225a76f
 
 
 
af71291
225a76f
ae7455e
 
 
225a76f
ae7455e
 
 
225a76f
ae7455e
 
 
 
af71291
225a76f
c821124
af71291
225a76f
fcafb91
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Use an official Python runtime as the base image
FROM python:3.12.3-slim  # Slim version for a smaller image size
LABEL authors="muzammil"

# Set Hugging Face cache directory to /tmp/.cache (which should be writable)
ENV HF_HOME="/tmp/.cache"

# Install FFmpeg and other necessary dependencies
RUN apt-get update && apt-get install -y ffmpeg && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Create a user with a specific UID for permissions handling
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

WORKDIR $HOME/app

# Copy the current directory contents into the container
COPY --chown=user . $HOME/app

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

# Expose the port for Gradio app (usually runs on 7860 by default)
EXPOSE 7860

# Command to run the Gradio app
CMD ["python3", "app.py"]