366degrees commited on
Commit
4c54de5
·
verified ·
1 Parent(s): b7c483b

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a minimal Hugging Face base image with PyTorch and Transformers
2
+ FROM huggingface/transformers-pytorch-cpu:latest
3
+
4
+ # Set working directory inside the container
5
+ WORKDIR /app
6
+
7
+ # Copy model and code files into the container
8
+ COPY . /app
9
+
10
+ # Install dependencies
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Expose port for inference API
14
+ EXPOSE 7860
15
+
16
+ # Set environment variables (optional)
17
+ ENV HF_HOME=/root/.cache/huggingface
18
+ ENV PYTHONUNBUFFERED=1
19
+
20
+ # Run the inference script
21
+ CMD ["python", "api_inference.py"]