x-sentiment-analysis / Dockerfile
AbdoIR's picture
Update Dockerfile
150e3d6 verified
raw
history blame contribute delete
515 Bytes
# Use official lightweight Python image
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy all project files
COPY . /app
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# Expose port
EXPOSE 7860
# Run the FastAPI app with uvicorn
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]