rahim-khan-iitg commited on
Commit
2544818
·
verified ·
1 Parent(s): 6cb43d2

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official Python image from Docker Hub
2
+ FROM python:3.10-slim
3
+
4
+ # Set the working directory
5
+ WORKDIR /app
6
+
7
+ # Copy the requirements file into the container
8
+ COPY requirements.txt .
9
+
10
+ # Install dependencies
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # COPY .env /app/.env
14
+
15
+ # Copy the current directory contents into the container at /app
16
+ COPY . .
17
+ RUN mkdir -p /app/cache && chmod 777 /app/cache
18
+ RUN mkdir -p /app/cache/hub
19
+ ENV HF_HOME=/app/cache
20
+ ENV TRANSFORMERS_CACHE=/app/cache
21
+ # Command to run the FastAPI app
22
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7868"]