demo-docker-gradio / Dockerfile
sigyllly's picture
Update Dockerfile
7dfb4c7 verified
raw
history blame
875 Bytes
# Use an official Python slim image
FROM python:3.10-slim
# Install Wine and dependencies for running Windows applications
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y --no-install-recommends \
wine64 \
wine32 \
wget \
apt-utils && \
apt-get clean
# Download and install the .NET Framework version that includes csc.exe
RUN wget https://download-link-for-csc-version-4.8.exe -O dotnet-installer.exe && \
wine dotnet-installer.exe
# Set up working directories and permissions
WORKDIR /app
RUN mkdir -p /app/uploads /app/compiled && chmod -R 777 /app/uploads /app/compiled
# Copy the Python requirements and install Flask
COPY requirements.txt .
RUN pip install -r requirements.txt
# Copy all app files
COPY . .
# Expose the Flask app port
EXPOSE 7860
# Run the Flask application
CMD ["python", "main.py"]