koesan's picture
Update Dockerfile
cd29fed verified
raw
history blame contribute delete
604 Bytes
FROM python:3.10-slim
# Sistem bağımlılıklarını kur
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Matplotlib için geçici dizinler oluştur
RUN mkdir -p /tmp/matplotlib && \
chmod 777 /tmp/matplotlib
# Environment variables
ENV MPLCONFIGDIR=/tmp/matplotlib
ENV FLASK_APP=app.py
# Çalışma dizini
WORKDIR /app
# Requirements kopyala ve kur
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Tüm uygulama dosyalarını kopyala
COPY . .
# Port
EXPOSE 7860
# Uygulamayı başlat
CMD ["python", "app.py"]