Spaces:
Runtime error
Runtime error
File size: 1,034 Bytes
b293d47 |
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 33 34 35 36 37 38 |
# Use an official Python runtime as the parent image
FROM python:3.11-bullseye
RUN apt-get update && apt-get install -y \
ffmpeg \
imagemagick \
ghostscript \
fonts-roboto \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Update font cache
RUN fc-cache -f -v
RUN sed -i '/<policy domain="path" rights="none" pattern="@\*"/d' /etc/ImageMagick-6/policy.xml
# Clean up APT when done
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Set the working directory in the container to /app
WORKDIR /app
# Install any Python packages specified in requirements.txt
# Copy requirements file
COPY requirements.txt .
# Install dependencies
RUN pip install -r requirements.txt
# Copy the local package directory content into the container at /app
COPY . /app
EXPOSE 31415
# Define any environment variables
# ENV KEY Value
# Print environment variables (for debugging purposes, you can remove this line if not needed)
RUN ["printenv"]
# Run Python script when the container launches
CMD ["python", "./runShortGPT.py"] |