Fred808 commited on
Commit
ade2420
·
verified ·
1 Parent(s): f5b8f7e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +43 -29
Dockerfile CHANGED
@@ -1,29 +1,43 @@
1
- FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04
2
-
3
- ENV DEBIAN_FRONTEND=noninteractive
4
-
5
- # Python + dependencies
6
- RUN apt-get update && apt-get install -y python3 python3-pip git && \
7
- pip3 install --upgrade pip
8
-
9
- # Set working dir
10
- WORKDIR /app
11
-
12
- # Copy and install requirements
13
- COPY requirements.txt ./
14
- RUN pip install --no-cache-dir -r requirements.txt
15
-
16
- # Copy app code
17
- COPY . .
18
-
19
- # ybyjngamhtcuaupc gsmt
20
-
21
- # Make the entire /app directory fully writeable for all users
22
- RUN chmod -R 777 /app
23
-
24
- # Ensure the app runs as the same user as the Space UI
25
- RUN useradd -m -u 1000 user
26
- USER user
27
-
28
- # Launch FastAPI download server on container start
29
- CMD ["uvicorn", "download_api:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:11.8.0-runtime-ubuntu22.04
2
+
3
+ FROM python:3.11-slim-bullseye
4
+
5
+ WORKDIR /app
6
+
7
+ # Enable contrib and non-free repos, and install system dependencies
8
+ RUN sed -i 's/main/main contrib non-free/' /etc/apt/sources.list && \
9
+ apt-get update && \
10
+ apt-get install -y --no-install-recommends \
11
+ unrar \
12
+ libgl1 \
13
+ libglib2.0-0 \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+
17
+ ENV DEBIAN_FRONTEND=noninteractive
18
+
19
+ # Python + dependencies
20
+ RUN apt-get update && apt-get install -y python3 python3-pip git && \
21
+ pip3 install --upgrade pip
22
+
23
+ # Set working dir
24
+ WORKDIR /app
25
+
26
+ # Copy and install requirements
27
+ COPY requirements.txt ./
28
+ RUN pip install --no-cache-dir -r requirements.txt
29
+
30
+ # Copy app code
31
+ COPY . .
32
+
33
+ # ybyjngamhtcuaupc gsmt
34
+
35
+ # Make the entire /app directory fully writeable for all users
36
+ RUN chmod -R 777 /app
37
+
38
+ # Ensure the app runs as the same user as the Space UI
39
+ RUN useradd -m -u 1000 user
40
+ USER user
41
+
42
+ # Launch FastAPI download server on container start
43
+ CMD ["uvicorn", "download_api:app", "--host", "0.0.0.0", "--port", "7860"]