api_crop_soil / Dockerfile
Maulidaaa's picture
Create Dockerfile
0ef6d1b
raw
history blame contribute delete
543 Bytes
# Gunakan Python image
FROM python:3.10-slim
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
python3-dev \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy files
COPY . /app
# Install Python dependencies
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Jalankan Flask server
ENV FLASK_APP=app.py
ENV FLASK_RUN_HOST=0.0.0.0
CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]