Skip to content

Commit 54ad797

Browse files
committed
refactor: Clean up Dockerfile comments and remove unnecessary lines
1 parent 541fd76 commit 54ad797

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

Dockerfile

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,25 @@
1-
# Use official Python image as base
1+
# Base Python image
22
FROM python:3.11-slim
33

4-
# Set environment variables
4+
# Don’t write .pyc files & keep logs unbuffered
55
ENV PYTHONDONTWRITEBYTECODE=1 \
66
PYTHONUNBUFFERED=1
77

88
# Set work directory
99
WORKDIR /app
1010

11-
# Install system dependencies
12-
RUN apt-get update && \
13-
apt-get install -y --no-install-recommends build-essential && \
14-
rm -rf /var/lib/apt/lists/*
11+
# Install deps
12+
COPY requirements.txt .
1513

16-
# Copy requirements
17-
COPY requirements.txt ./
18-
19-
# Install Python dependencies
2014
RUN pip install --upgrade pip && \
2115
pip install --no-cache-dir -r requirements.txt && \
2216
pip install --no-cache-dir metaai-sdk
2317

24-
# Copy project files
18+
# Copy app code
2519
COPY . .
2620

27-
# Expose port (if running a server, adjust as needed)
21+
# Tell container what port will be used
2822
EXPOSE 8000
2923

30-
# Default command (adjust as needed, e.g., to run a server or script)
31-
CMD ["uvicorn", "metaai_api.api_server:app", "--host", "0.0.0.0", "--port", "${PORT:-8000}", "--reload"]
24+
# Launch Uvicorn binding to 0.0.0.0 on port 8000
25+
CMD ["uvicorn", "metaai_api.api_server:app", "--host", "0.0.0.0", "--port", "8000"]

0 commit comments

Comments
 (0)