Skip to content

Commit

Permalink
Updated the dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
BanulaKumarage committed Feb 12, 2024
1 parent d3a8598 commit 7646073
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: Build environment
FROM python:3.10.12-slim
FROM python:3.10.12-slim as builder

WORKDIR /app

Expand All @@ -8,20 +8,20 @@ COPY image-captioning/requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

# # Stage 2: Runtime environment
# FROM python:3.9-slim
FROM python:3.10.12-slim as final

WORKDIR /app

# WORKDIR /app
# Copy the installed dependencies from the builder stage
COPY --from=builder /usr/local/lib/python3.9/site-packages /usr/local/lib/python3.9/site-packages

# # Copy the installed dependencies from the builder stage
# COPY --from=builder /usr/local/lib/python3.9/site-packages /usr/local/lib/python3.9/site-packages
WORKDIR /app

# # Copy the Python script
# COPY your_script.py .
# Copy the Python script
COPY . .

EXPOSE 8080

# Run the Python script
CMD ["python", "image-captioning/server.py"]
CMD ["python", "image-captioning/server.py"]

0 comments on commit 7646073

Please sign in to comment.