Spaces:
Sleeping
Sleeping
# Use the official latest Python image as a parent image | |
# FROM python:latest | |
# FROM python:3.13-slim | |
FROM ubuntu:latest | |
# Set the working directory in the container | |
WORKDIR /app | |
# Install system dependencies including cppcheck and clang-tidy | |
# This is done in a single RUN layer to reduce image size | |
# RUN apt-get update | |
# RUN apt-get install -y software-properties-common add-apt-repository universe | |
# RUN apt-get update | |
# RUN apt-get install -y cppcheck | |
# RUN rm -rf /var/lib/apt/lists/* | |
# Install Python and other system dependencies | |
RUN apt-get update && \ | |
apt-get install -y python3 python3-pip software-properties-common && \ | |
add-apt-repository universe && \ | |
apt-get update && \ | |
apt-get install -y cppcheck ffmpeg libsm6 libxext6 && \ | |
rm -rf /var/lib/apt/lists/* | |
# Install ffmpeg, a critical system dependency for pydub | |
#RUN apt-get install -y ffmpeg | |
ENV PIP_BREAK_SYSTEM_PACKAGES=1 | |
# Copy the requirements file into the container at /app | |
COPY requirements.txt . | |
# Install any needed packages specified in requirements.txt | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy the application script into the container at /app | |
COPY app.py . | |
# Make port 7860 available to the world outside this container | |
EXPOSE 7860 | |
# Define the command to run the application | |
# CMD ["python3", "app.py"] | |
CMD ["cppcheck, "--version"] |