UserArkham commited on
Commit
843d0a0
·
verified ·
1 Parent(s): 8ba77f0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -30
Dockerfile CHANGED
@@ -1,31 +1,23 @@
1
- FROM python:3.9-slim
2
-
3
- WORKDIR /code
4
-
5
- # Install system dependencies
6
- RUN apt-get update && apt-get install -y \
7
- curl \
8
- build-essential \
9
- && rm -rf /var/lib/apt/lists/*
10
-
11
- # Upgrade pip
12
- RUN pip install --upgrade pip
13
-
14
- # Copy requirements first for better caching
15
- COPY requirements.txt .
16
-
17
- # Install Python dependencies with no cache and verbose output
18
- RUN pip install --no-cache-dir --verbose -r requirements.txt
19
-
20
- # Copy application files
21
- COPY . .
22
-
23
- # Create a non-root user
24
- RUN useradd -m -u 1000 user
25
- USER user
26
-
27
- # Expose the port (HF Spaces uses 7860)
28
- EXPOSE 7860
29
-
30
- # Start the API server
31
  CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.9-slim
2
+
3
+ WORKDIR /code
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
7
+
8
+ # Copy requirements
9
+ COPY requirements_simple.txt requirements.txt
10
+
11
+ # Install Python dependencies
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # Copy application files
15
+ COPY simple_api.py api.py
16
+ COPY allsides_data.csv .
17
+ COPY blacklist.csv .
18
+
19
+ # Expose port
20
+ EXPOSE 7860
21
+
22
+ # Start the API server
 
 
 
 
 
 
 
 
23
  CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]