Skip to content

Commit a93e16f

Browse files
committed
feat: added labels, combined commands, moved installation for requirements before adding the src
1 parent 83067b7 commit a93e16f

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

Dockerfile

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
# Include Python
22
FROM python:3.10-alpine
33

4+
# Label your image with metadata
5+
LABEL maintainer="[email protected]"
6+
LABEL org.opencontainers.image.source https://github.com/blib-la/runpod-worker-helloworld
7+
LABEL org.opencontainers.image.description "Getting started with a serverless endpoint on RunPod by creating a custom workerUI"
8+
49
# Define your working directory
510
WORKDIR /
611

7-
# Add your src
8-
ADD src/start.sh src/rp_handler.py requirements.txt ./
9-
RUN chmod +x /start.sh
12+
# Copy the requirements into the image
13+
COPY requirements.txt ./
1014

1115
# Intall dependencies
12-
RUN pip install -r requirements.txt
16+
RUN apk add --no-cache bash && \
17+
pip install --no-cache-dir -r requirements.txt
18+
19+
# Copy your source code into the image
20+
COPY src/ .
21+
22+
# Make the start script executable
23+
RUN chmod +x start.sh
1324

1425
# Run the start script
15-
CMD /start.sh
26+
CMD ["/start.sh"]

0 commit comments

Comments
 (0)