Skip to content

Commit 19bdbfb

Browse files
committed
feat: docker settings modify
1 parent 2aa5db8 commit 19bdbfb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

server/Dockerfile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
# Base image
12
FROM python:3.11-slim
23

4+
# Install dependencies
35
RUN apt-get update && apt-get install -y \
46
gcc \
57
g++ \
@@ -9,18 +11,25 @@ RUN apt-get update && apt-get install -y \
911
curl \
1012
&& rm -rf /var/lib/apt/lists/*
1113

14+
# Set working directory
1215
WORKDIR /app
1316

17+
# Set Hugging Face mirror
1418
ENV HF_ENDPOINT=https://hf-mirror.com
1519

20+
# Install Python packages
1621
COPY server/requirements.txt .
1722
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
1823

19-
# 复制 server 和 src 代码
24+
# Copy application code
2025
COPY server/ ./server/
2126
COPY src/ ./src/
2227

28+
# Set Python import path
2329
ENV PYTHONPATH=/app/src
2430

31+
# Expose port
2532
EXPOSE 8000
33+
34+
# Start the server
2635
CMD ["uvicorn", "memos.api.product_api:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]

0 commit comments

Comments
 (0)