File size: 737 Bytes
219df52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212ac2a
219df52
 
76da737
219df52
 
 
 
 
 
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
# Use an official Python runtime as a parent image
FROM python:3.11-slim

# Set working directory in the container
WORKDIR /app

# Copy requirements file
COPY requirements.txt .

# Install system dependencies and Python packages
RUN apt-get update && apt-get install -y \
    gcc \
    && rm -rf /var/lib/apt/lists/* \
    && pip install --no-cache-dir -r requirements.txt

# Copy the entire application code
COPY . .

# Expose the port Flask will run on
# EXPOSE 5000

EXPOSE 7860
ENV SPACE_URL=https://multitransformer-tonic-discharge-guard.hf.space
# Set environment variables (optional, can be overridden in Hugging Face Spaces)
ENV FLASK_ENV=production
ENV PYTHONUNBUFFERED=1

# Command to run the Flask app
CMD ["python", "app.py"]