bigbossmonster commited on
Commit
e9df066
·
verified ·
1 Parent(s): 7c407d8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -10
Dockerfile CHANGED
@@ -1,23 +1,19 @@
1
- # Use lightweight Python 3.10
2
  FROM python:3.10-slim
3
 
4
- # Set working directory
5
  WORKDIR /app
6
 
7
- # Copy and install dependencies
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
- # Copy the application code
12
  COPY . .
13
 
14
- # --- HUGGING FACE PERMISSIONS ---
15
- # HF runs as user 1000 (non-root). We must ensure the app can write temp files.
16
- RUN mkdir -p /app/temp && chmod 777 /app/temp
17
- ENV TMPDIR=/app/temp
18
 
19
- # Expose the specific port HF expects
20
  EXPOSE 7860
21
 
22
- # Start Uvicorn on port 7860
23
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.10-slim
2
 
 
3
  WORKDIR /app
4
 
5
+ # Install dependencies
6
  COPY requirements.txt .
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
9
+ # Copy app code
10
  COPY . .
11
 
12
+ # Setup temp directory for HF Spaces (non-root user)
13
+ RUN mkdir -p /tmp/verifier_uploads && chmod 777 /tmp/verifier_uploads
14
+ ENV TMPDIR=/tmp/verifier_uploads
 
15
 
16
+ # Hugging Face Spaces Port
17
  EXPOSE 7860
18
 
 
19
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]