27 lines
536 B
Docker
27 lines
536 B
Docker
FROM python:3.10-slim
|
||
|
||
# Çalışma dizinini ayarla
|
||
WORKDIR /app
|
||
|
||
# Sistem bağımlılıkları
|
||
RUN apt-get update && apt-get install -y \
|
||
build-essential \
|
||
&& rm -rf /var/lib/apt/lists/*
|
||
|
||
# Python bağımlılıklarını kopyala ve kur
|
||
COPY requirements.txt .
|
||
RUN pip install --no-cache-dir -r requirements.txt
|
||
|
||
# SpaCy modelini indir
|
||
RUN python -m spacy download en_core_web_sm
|
||
|
||
# Uygulama kodunu kopyala
|
||
COPY . .
|
||
|
||
# Veri dizinlerini oluştur
|
||
RUN mkdir -p data output
|
||
|
||
# Varsayılan komut (web server)
|
||
CMD ["python", "app.py"]
|
||
|