Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +9 -20
Dockerfile
CHANGED
@@ -1,23 +1,12 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
|
|
|
|
|
4 |
|
5 |
-
#
|
6 |
-
|
7 |
-
curl git sudo python3 python3-pip nodejs npm \
|
8 |
-
iputils-ping net-tools vim \
|
9 |
-
&& rm -rf /var/lib/apt/lists/*
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
# Copy package.json first (cache layer)
|
14 |
-
COPY package.json .
|
15 |
-
|
16 |
-
# Install Node dependencies
|
17 |
-
RUN npm install --omit=dev
|
18 |
-
|
19 |
-
# Copy the app code
|
20 |
-
COPY . .
|
21 |
-
|
22 |
-
# Hugging Face will inject $PORT at runtime
|
23 |
-
CMD ["npm", "start"]
|
|
|
1 |
+
# Base image: HF text-generation-inference server
|
2 |
+
FROM ghcr.io/huggingface/text-generation-inference:latest
|
3 |
|
4 |
+
# Environment variables
|
5 |
+
ENV MODEL_ID=meta-llama/Llama-2-7b-chat-hf
|
6 |
+
ENV PORT=7860
|
7 |
|
8 |
+
# Expose the port for the HF Space
|
9 |
+
EXPOSE 7860
|
|
|
|
|
|
|
10 |
|
11 |
+
# Launch the HF inference server
|
12 |
+
CMD ["text-generation-launcher", "--model-id", "meta-llama/Llama-2-7b-chat-hf", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|