AUXteam commited on
Commit
fdcdf6c
·
verified ·
1 Parent(s): 203900a

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. Dockerfile +8 -20
  2. README.md +2 -3
Dockerfile CHANGED
@@ -1,28 +1,16 @@
1
- FROM python:3.12-slim
2
-
3
- # Install system dependencies
4
- RUN apt-get update && apt-get install -y \
5
- build-essential \
6
- curl \
7
- git \
8
- && rm -rf /var/lib/apt/lists/*
9
-
10
- # Create a non-root user
11
- RUN useradd -m -u 1000 user
12
- USER user
13
- ENV PATH="/home/user/.local/bin:${PATH}"
14
 
15
  WORKDIR /app
16
 
17
- # Copy requirements and install
18
- COPY --chown=user requirements.txt .
19
- RUN pip install --no-cache-dir --user -r requirements.txt
20
 
21
- # Copy the rest of the application
22
- COPY --chown=user . .
23
 
24
- # Expose the HF port
25
  EXPOSE 7860
26
 
27
- # Run the application
28
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.11-slim
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install dependencies
6
+ COPY requirements.txt .
7
+ RUN pip install --no-cache-dir -r requirements.txt
8
 
9
+ # Copy the app files
10
+ COPY . .
11
 
12
+ # Expose the standard port
13
  EXPOSE 7860
14
 
15
+ # Run the FastAPI app using uvicorn
16
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
README.md CHANGED
@@ -3,9 +3,8 @@ title: Tiny Factory
3
  emoji: 💻
4
  colorFrom: yellow
5
  colorTo: gray
6
- sdk: gradio
7
- sdk_version: 6.3.0
8
- app_file: app.py
9
  pinned: false
10
  ---
11
 
 
3
  emoji: 💻
4
  colorFrom: yellow
5
  colorTo: gray
6
+ sdk: docker
7
+ app_port: 7860
 
8
  pinned: false
9
  ---
10