Tantawi commited on
Commit
7d065f5
·
verified ·
1 Parent(s): 27bcfae

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ # Set working directory
4
+ WORKDIR /code
5
+
6
+ # Copy requirements first for better caching
7
+ COPY ./requirements.txt /code/requirements.txt
8
+
9
+ # Install dependencies
10
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
11
+
12
+ # Copy application code
13
+ COPY . /code
14
+
15
+ # Expose port 7860 (required by Hugging Face Spaces)
16
+ EXPOSE 7860
17
+
18
+ # Set environment variables
19
+ ENV PYTHONPATH=/code
20
+ ENV HUGGINGFACE_API_KEY=${HUGGINGFACE_API_KEY}
21
+
22
+ # Command to run the application
23
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]