RohanVashisht commited on
Commit
7a0c529
·
verified ·
1 Parent(s): 3bd1a1b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -10
Dockerfile CHANGED
@@ -1,23 +1,15 @@
1
- # Use official Bun base image
2
  FROM oven/bun:1.0.30
3
 
4
- # Create non-root user like Hugging Face expects
5
  RUN adduser --disabled-password --gecos "" user
6
  USER user
7
  ENV PATH="/home/user/.bun/bin:$PATH"
8
 
9
- # Set working directory
10
  WORKDIR /app
11
 
12
- # Copy only dependencies first for caching
13
- COPY --chown=user bun.lockb bunfig.toml ./
14
- RUN bun install
15
-
16
- # Copy the rest of the code
17
  COPY --chown=user . .
18
 
19
- # Port Hugging Face expects
 
20
  EXPOSE 7860
21
 
22
- # Run the server (make sure your script listens on port 7860)
23
  CMD ["bun", "./src/index.ts"]
 
 
1
  FROM oven/bun:1.0.30
2
 
 
3
  RUN adduser --disabled-password --gecos "" user
4
  USER user
5
  ENV PATH="/home/user/.bun/bin:$PATH"
6
 
 
7
  WORKDIR /app
8
 
 
 
 
 
 
9
  COPY --chown=user . .
10
 
11
+ RUN bun install
12
+
13
  EXPOSE 7860
14
 
 
15
  CMD ["bun", "./src/index.ts"]