smjain's picture
Upload 2 files
e5b72ea verified
raw
history blame
1.33 kB
# Use the specified RunPod base image with CUDA support and Python 3.8
FROM python:3.8-slim
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
python3-dev \
ffmpeg \
aria2 \
git \
git-lfs \
&& rm -rf /var/lib/apt/lists/*
# Clone the repository into the container
ARG CACHEBUST=1
RUN git clone https://huggingface.co/spaces/smjain/Advanced-RVC-Inference /app
# Set the working directory to the cloned repository to run commands inside it
WORKDIR /app
# Install Git Large File Storage (LFS), then pull LFS files
RUN git lfs install && git lfs pull
# Create a virtual environment named 'infer' and activate it
#RUN python3 -m venv /venv/infer
#ENV PATH="/venv/infer/bin:$PATH"
# Upgrade pip and install Python dependencies from the project's requirements.txt
# Also, install Flask and av as specified
RUN pip install --upgrade pip && \
pip install --upgrade -r requirements.txt --no-cache-dir && \
pip install flask av boto3 flask_dance
# Move PyTorch model weights into the weights directory if necessary
RUN mv *.pth weights/ || echo "No weights to move"
# Setting Flask application
# Expose the port Flask is running on
EXPOSE 5000
# Command to directly run the Flask application script
CMD ["python", "myinfer_latest.py"]