Likhith Sai Seemala commited on
Commit
0ed604b
·
1 Parent(s): 6a81ad7

fix: resolve GLIBC version mismatch and Tor config warnings by pinning builder to bookworm

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -6
Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
  # --- Build Stage for Rust ---
2
- FROM rust:latest as builder
3
 
4
  WORKDIR /app
5
 
@@ -26,6 +26,7 @@ RUN apt-get update && apt-get install -y \
26
  ca-certificates \
27
  libssl3 \
28
  tor \
 
29
  && rm -rf /var/lib/apt/lists/*
30
 
31
  # Create a non-root user for Hugging Face Spaces
@@ -49,15 +50,13 @@ RUN pip install --no-cache-dir -r /home/user/app/services/query_layer/requiremen
49
  # Copy configuration files
50
  COPY config.yaml sources.yaml /home/user/app/
51
 
52
- # Download models (Optional: You can also download these during startup)
53
- # For now, we assume models are either in the repo or downloaded via script
54
- # RUN python /home/user/app/scripts/export_model.py
55
-
56
  # Create entrypoint script
57
  USER root
58
  RUN echo '#!/bin/bash\n\
59
  # Start Tor daemon\n\
60
- mkdir -p /tmp/tor-data\n\
 
 
61
  tor -f /tmp/tor/torrc --allow-missing-torrc --SocksPort 9050 --DataDirectory /tmp/tor-data &\n\
62
  sleep 5\n\
63
  \n\
 
1
  # --- Build Stage for Rust ---
2
+ FROM rust:1.75-slim-bookworm as builder
3
 
4
  WORKDIR /app
5
 
 
26
  ca-certificates \
27
  libssl3 \
28
  tor \
29
+ netcat-openbsd \
30
  && rm -rf /var/lib/apt/lists/*
31
 
32
  # Create a non-root user for Hugging Face Spaces
 
50
  # Copy configuration files
51
  COPY config.yaml sources.yaml /home/user/app/
52
 
 
 
 
 
53
  # Create entrypoint script
54
  USER root
55
  RUN echo '#!/bin/bash\n\
56
  # Start Tor daemon\n\
57
+ mkdir -p /tmp/tor /tmp/tor-data\n\
58
+ # Create a dummy torrc if it doesn't exist to satisfy the -f flag\n\
59
+ touch /tmp/tor/torrc\n\
60
  tor -f /tmp/tor/torrc --allow-missing-torrc --SocksPort 9050 --DataDirectory /tmp/tor-data &\n\
61
  sleep 5\n\
62
  \n\