Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +16 -3
Dockerfile
CHANGED
@@ -1,14 +1,27 @@
|
|
|
|
1 |
FROM vllm/vllm-openai:latest
|
2 |
|
|
|
3 |
WORKDIR /app
|
|
|
|
|
4 |
COPY . /app
|
5 |
|
|
|
6 |
RUN pip install --no-cache-dir -r requirements.txt
|
7 |
-
RUN chmod +x start.sh
|
8 |
|
|
|
|
|
|
|
|
|
|
|
9 |
EXPOSE 7860
|
10 |
|
11 |
-
# Clear the base image's entrypoint
|
12 |
ENTRYPOINT []
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use the official vLLM Docker image as the base image
|
2 |
FROM vllm/vllm-openai:latest
|
3 |
|
4 |
+
# Set working directory
|
5 |
WORKDIR /app
|
6 |
+
|
7 |
+
# Copy application files into the container
|
8 |
COPY . /app
|
9 |
|
10 |
+
# Install additional Python packages if needed
|
11 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
12 |
|
13 |
+
# Create a writable cache directory and set the HF_HOME environment variable
|
14 |
+
RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
|
15 |
+
ENV HF_HOME=/app/.cache
|
16 |
+
|
17 |
+
# Expose the port used by Gradio (default: 7860)
|
18 |
EXPOSE 7860
|
19 |
|
20 |
+
# Clear the base image's entrypoint (if needed)
|
21 |
ENTRYPOINT []
|
22 |
|
23 |
+
# Make the startup script executable
|
24 |
+
RUN chmod +x start.sh
|
25 |
+
|
26 |
+
# Run the startup script
|
27 |
+
CMD ["bash", "start.sh"]
|