demo-docker-gradio / Dockerfile
sigyllly's picture
Update Dockerfile
1de3b07 verified
raw
history blame
925 Bytes
# Use the official Python image
FROM python:3.10-slim
# Set the working directory
WORKDIR /app
# Install dependencies including .NET SDK and wget
RUN apt-get update && \
apt-get install -y wget gnupg ca-certificates && \
wget https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
apt-get update && \
apt-get install -y dotnet-sdk-6.0 && \
rm -rf /var/lib/apt/lists/*
# Create necessary directories and set permissions
RUN mkdir uploads compiled && \
chmod -R 777 uploads compiled
# Copy the requirements file
COPY ./requirements.txt /app/requirements.txt
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
# Copy the Flask app files
COPY . .
# Expose the port the app runs on
EXPOSE 7860
# Command to run the Flask app
CMD ["python", "main.py"]