Spaces:
Sleeping
Sleeping
Damien Benveniste
commited on
Commit
·
0c9fd7a
1
Parent(s):
0b3552f
modified
Browse files- Dockerfile +39 -19
Dockerfile
CHANGED
@@ -1,30 +1,50 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
#
|
4 |
-
|
5 |
|
6 |
-
# Set the working directory
|
7 |
WORKDIR /app
|
8 |
|
9 |
-
#
|
10 |
-
RUN pip install --no-cache-dir vllm
|
11 |
-
|
12 |
-
# Copy the entrypoint script
|
13 |
COPY entrypoint.sh /app/entrypoint.sh
|
|
|
14 |
|
15 |
-
#
|
16 |
-
|
17 |
|
18 |
-
#
|
19 |
-
|
20 |
|
21 |
-
# Switch to the non-root user
|
22 |
-
USER user
|
23 |
|
24 |
-
#
|
25 |
-
ENV PATH="/home/user/.local/bin:$PATH"
|
26 |
|
27 |
-
|
|
|
28 |
|
29 |
-
# Set the
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use the official vLLM image as the base image
|
2 |
+
FROM vllm/vllm-openai:latest
|
3 |
|
4 |
+
# If using v0.4.1 or v0.4.2, uncomment the following line:
|
5 |
+
# ENV VLLM_NCCL_SO_PATH=/root/.config/vllm/nccl/cu12/libnccl.so.2.18.1
|
6 |
|
7 |
+
# Set the working directory
|
8 |
WORKDIR /app
|
9 |
|
10 |
+
# Copy your entrypoint script
|
|
|
|
|
|
|
11 |
COPY entrypoint.sh /app/entrypoint.sh
|
12 |
+
RUN chmod +x /app/entrypoint.sh
|
13 |
|
14 |
+
# Expose the port the app runs on
|
15 |
+
EXPOSE 8000
|
16 |
|
17 |
+
# Set the entrypoint
|
18 |
+
ENTRYPOINT ["/app/entrypoint.sh"]
|
19 |
|
|
|
|
|
20 |
|
21 |
+
# FROM python:3.9
|
|
|
22 |
|
23 |
+
# # Create a non-root user
|
24 |
+
# RUN useradd -m -u 1000 user
|
25 |
|
26 |
+
# # Set the working directory in the container
|
27 |
+
# WORKDIR /app
|
28 |
+
|
29 |
+
# # Install vLLM
|
30 |
+
# RUN pip install --no-cache-dir vllm
|
31 |
+
|
32 |
+
# # Copy the entrypoint script
|
33 |
+
# COPY entrypoint.sh /app/entrypoint.sh
|
34 |
+
|
35 |
+
# # Change ownership of the working directory and entrypoint script to the non-root user
|
36 |
+
# RUN chown -R user:user /app
|
37 |
+
|
38 |
+
# # Change permissions of the entrypoint script
|
39 |
+
# RUN chmod +x /app/entrypoint.sh
|
40 |
+
|
41 |
+
# # Switch to the non-root user
|
42 |
+
# USER user
|
43 |
+
|
44 |
+
# # Set the PATH for the non-root user
|
45 |
+
# ENV PATH="/home/user/.local/bin:$PATH"
|
46 |
+
|
47 |
+
# EXPOSE 8000
|
48 |
+
|
49 |
+
# # Set the entrypoint
|
50 |
+
# ENTRYPOINT ["/app/entrypoint.sh"]
|