athv commited on
Commit
aa13178
·
verified ·
1 Parent(s): 8a48afb

Updated Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -22
Dockerfile CHANGED
@@ -1,23 +1,17 @@
1
- # Use Python 3.9
2
- FROM python:3.9
3
-
4
- # Set working directory
5
- WORKDIR /app
6
-
7
- # Copy requirements and install them
8
- COPY requirements.txt .
9
- RUN pip install --no-cache-dir -r requirements.txt
10
-
11
- # Copy the server code
12
- COPY server.py .
13
-
14
- # Create a cache directory for the model (fixes permission errors)
15
- RUN mkdir -p /app/cache
16
- ENV HF_HOME=/app/cache
17
- RUN chmod -R 777 /app/cache
18
-
19
- # Expose the port Hugging Face uses
20
- EXPOSE 7860
21
-
22
- # Run the server
23
  CMD ["python", "server.py"]
 
1
+
2
+ FROM python:3.9
3
+
4
+ WORKDIR /app
5
+
6
+ COPY requirements.txt .
7
+ RUN pip install --no-cache-dir -r requirements.txt
8
+
9
+ COPY server.py .
10
+
11
+ RUN mkdir -p /app/cache
12
+ ENV HF_HOME=/app/cache
13
+ RUN chmod -R 777 /app/cache
14
+
15
+ EXPOSE 7860
16
+
 
 
 
 
 
 
17
  CMD ["python", "server.py"]