stpete2 commited on
Commit
e912f66
·
verified ·
1 Parent(s): c987373

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -0
app.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:11.6.2-base-ubuntu20.04
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
+ WORKDIR /code
5
+
6
+ # Install Python and dependencies
7
+ RUN apt-get update && \
8
+ apt-get install -y python3 python3-pip git && \
9
+ apt-get clean && \
10
+ rm -rf /var/lib/apt/lists/*
11
+
12
+ # Copy requirements and install
13
+ COPY requirements.txt .
14
+ RUN pip3 install --no-cache-dir -r requirements.txt
15
+
16
+ # Copy app files
17
+ COPY app.py .
18
+
19
+ # Set environment variables for HF
20
+ ENV HF_HOME=/code
21
+
22
+ # Expose port
23
+ EXPOSE 7860
24
+
25
+ # Run the application with proper host to expose externally
26
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]